GetList PlanPercentage CountAsync
This commit is contained in:
@@ -343,6 +343,8 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
if (searchModel.CountPerson > 0)
|
||||
plans = plans.Where(x => x.CountPerson == searchModel.CountPerson);
|
||||
|
||||
var count = await plans.CountAsync();
|
||||
|
||||
var planQueryFilter =await plans.ApplyPagination(searchModel.PageIndex, searchModel.PageSize).ToListAsync();
|
||||
var planResult = planQueryFilter.Select(plan =>
|
||||
new InstitutionPlanViewModel
|
||||
@@ -403,7 +405,7 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
|
||||
return new PagedResult<InstitutionPlanListDto>()
|
||||
{
|
||||
TotalCount = finalResult.Count,
|
||||
TotalCount = count,
|
||||
List = finalResult
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user