public async Task <IResultModel> Query(SkinQueryModel model) { var result = new QueryResultModel <SkinEntity> { Rows = await _repository.Query(model), Total = model.TotalCount }; return(ResultModel.Success(result)); }
public async Task <IList <SkinEntity> > Query(SkinQueryModel model) { var conditions = await _filter.GetConditions <SkinEntity, SkinQueryModel>(model); var query = _dbContext.Db.Queryable <SkinEntity>() .Where(conditions) .OrderBy(model.OrderFileds); RefAsync <int> totalCount = 0; var data = await query.ToPageListAsync(model.PageIndex, model.PageSize, totalCount); model.TotalCount = totalCount; return(data); }
public Task <IResultModel> Query([FromQuery] SkinQueryModel model) { return(_service.Query(model)); }