Exemple #1
0
        public PagedResult <UserListDTO> Filter(PaginationArgs args, UserListDTOSpec spec)
        {
            var us = new List <UserListDTO>()
            {
                new UserListDTO()
                {
                    Id = 1, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 2, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 3, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 4, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 5, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 6, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 7, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 8, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 9, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 10, Name = "Zeeshan", Surname = "Zahoor"
                },
                new UserListDTO()
                {
                    Id = 11, Name = "Zeeshan", Surname = "Zahoor"
                },
            };

            //var q = _userRepository.All.Select(m => new UserListDTO()
            //{

            //});
            var u = spec.ApplySpec(us.AsQueryable());

            return(this.ApplyPagination(us.AsQueryable(), args));
        }
        public IActionResult FillUserGrid([FromBody]PaginationArgs args, UserListDTOSpec spec)
        {
            var result = _userService.Filter(args, spec);

            return Json(result);
        }
Exemple #3
0
 public IActionResult Filter(UserListDTOSpec Spec)
 {
     return(null);
 }