public PagedCollection <UserDataGridViewModel> GetAllByPageAndSorting(UserPageAndSortingUICommand pageAndSorting) { var users = _userRepository.GetPagingData( x => pageAndSorting.Filter.Name == null || x.Name.Contains(pageAndSorting.Filter.Name), pageAndSorting.PageNumber, pageAndSorting.PageSize, pageAndSorting.OrderProperty, pageAndSorting.Ascending, out var totalRecordes) .Select(x => new UserDataGridViewModel { Id = x.Id.ToString(), Name = x.Name, }); return(new PagedCollection <UserDataGridViewModel>(pageAndSorting.PageNumber, totalRecordes, 10, users)); }
public PagedCollection <UserDataGridViewModel> Pagination([FromBody] UserPageAndSortingUICommand pageAndSorting) { return(Execute(() => _userLogic.GetAllByPageAndSorting(pageAndSorting))); }
public PagedCollection <UserDataGridViewModel> Pagination(UserPageAndSortingUICommand pageAndSorting) { return(_userLogic.GetAllByPageAndSorting(pageAndSorting)); }