public async Task <PagedResult <IUserLocation> > GetUserLocations(Guid siteId, Guid userId, int pageNumber, int pageSize) { var result = new PagedResult <IUserLocation>(); var list = await queries.GetUserLocationsByUser(siteId, userId, pageNumber, pageSize); result.Data = list.ToList(); result.TotalItems = await queries.CountUserLocationsByUser(siteId, userId); result.PageNumber = pageNumber; result.PageSize = pageSize; return(result); }