Added the TotalRecords parameter to get contact list API response
This commit is contained in:
parent
935f5345b9
commit
01f214a60b
@ -231,11 +231,14 @@ namespace Marco.Pms.Services.Service
|
|||||||
return contactVM;
|
return contactVM;
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
var totalPages = (int)Math.Ceiling((double)totalCount / pageSize);
|
||||||
|
|
||||||
// Step 7: Construct and return the final response.
|
// Step 7: Construct and return the final response.
|
||||||
var response = new
|
var response = new
|
||||||
{
|
{
|
||||||
TotalPages = (int)Math.Ceiling((double)totalCount / pageSize),
|
TotalPages = totalPages,
|
||||||
CurrentPage = pageNumber,
|
CurrentPage = pageNumber,
|
||||||
|
TotalRecords = totalCount,
|
||||||
PageSize = pageSize,
|
PageSize = pageSize,
|
||||||
Data = list
|
Data = list
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user