private void ValidateRequest_Search(SearchInfoCustomerDTO input)
 {
     if (input == null)
     {
         throw new UserException(ErrorStatusReturn.REQUEST_NULL);
     }
 }
 public ApiJsonResult SearchInfoCustomer([FromBody] SearchInfoCustomerDTO input)
 {
     try
     {
         ValidateRequest_Search(input);
         return(new ApiJsonResult(true, _inforCustomerService.GetAllWithFillter(input)));
     }
     catch (Exception ex)
     {
         return(ProcessException(ex));
     }
 }
        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);
        }