Пример #1
0
        public IEnumerable <Complaint> GetComplaintPaged(int page, int count, out int totalCount,
                                                         ComplaintFilter filter = null, OrderExpression orderExpression = null)
        {
            var expression = new ComplaintQueryObject(filter).Expression;

            totalCount = Count(expression);
            return(ComplaintPaged(page, count, expression, orderExpression));
        }
        public IEnumerable <ComplaintModel> Query(int page, int count, ComplaintFilter filter, string orderByExpression = null)
        {
            var orderBy  = OrderExpression.Deserializer(orderByExpression);
            var entities =
                _repository.GetComplaintPaged(page,
                                              count, filter, orderBy);

            return(ProcessQuery(entities));
        }
Пример #3
0
 public IActionResult GetCount(int page, int size, string whereCondition = null, string orderByExpression = null)
 {
     try
     {
         var filter = ComplaintFilter.Deserialize(whereCondition);
         filter.ComplainBy = GetCurrentUserId();
         var responseData = _service.GetCount(page, size, filter, orderByExpression);
         return(Ok(responseData));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
        public CountModel <ComplaintItem> GetCount(int page, int count, ComplaintFilter filter, string orderByExpression = null)
        {
            int totalCount;
            var orderBy  = OrderExpression.Deserializer(orderByExpression);
            var entities =
                _repository.GetComplaintPaged(page,
                                              count, out totalCount, filter, orderBy);

            return(new CountModel <ComplaintItem>
            {
                Total = totalCount,
                Items = ProcessQuery(entities)
            });
        }
Пример #5
0
 public ComplaintQueryObject(ComplaintFilter filter)
 {
     if (filter != null)
     {
     }
 }
Пример #6
0
        public IEnumerable <Complaint> GetComplaintFilteredQueryable(ComplaintFilter filter = null)
        {
            var expression = new ComplaintQueryObject(filter).Expression;

            return(Fetch(expression));
        }