private void ValidateRequest_Search(SearchInfoCustomerDTO input)
 {
     if (input == null)
     {
         throw new UserException(ErrorStatusReturn.REQUEST_NULL);
     }
 }
コード例 #2
0
 public ApiJsonResult SearchInfoCustomer([FromBody] SearchInfoCustomerDTO input)
 {
     try
     {
         ValidateRequest_Search(input);
         return(new ApiJsonResult(true, _inforCustomerService.GetAllWithFillter(input)));
     }
     catch (Exception ex)
     {
         return(ProcessException(ex));
     }
 }
コード例 #3
0
        public PaginationResultModel <InforCustomerSearchItemDTO> GetAllWithFillter(SearchInfoCustomerDTO input)
        {
            IQueryable <InfoCustomer> query = _inforCustomerRepository.FindAll();

            query = FilterConditionSearchInfoCustomer(query, input);

            PaginationResultModel <InforCustomerSearchItemDTO> resultSearch = new PaginationResultModel <InforCustomerSearchItemDTO>();
            var queryModelDTO = query.ProjectTo <InforCustomerSearchItemDTO>();

            var resultPaging = PaginationHelper.GetItemsWithPagination(queryModelDTO, input.PageIndex, input.PageSize);

            return(resultPaging);
        }