Example #1
0
        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));
        }
Example #2
0
 public PagedCollection <UserDataGridViewModel> Pagination([FromBody] UserPageAndSortingUICommand pageAndSorting)
 {
     return(Execute(() => _userLogic.GetAllByPageAndSorting(pageAndSorting)));
 }
Example #3
0
 public PagedCollection <UserDataGridViewModel> Pagination(UserPageAndSortingUICommand pageAndSorting)
 {
     return(_userLogic.GetAllByPageAndSorting(pageAndSorting));
 }