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)); }
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) }); }
public ComplaintQueryObject(ComplaintFilter filter) { if (filter != null) { } }
public IEnumerable <Complaint> GetComplaintFilteredQueryable(ComplaintFilter filter = null) { var expression = new ComplaintQueryObject(filter).Expression; return(Fetch(expression)); }