Exemplo n.º 1
0
        public async Task <IResultModel> Query(SkinQueryModel model)
        {
            var result = new QueryResultModel <SkinEntity>
            {
                Rows  = await _repository.Query(model),
                Total = model.TotalCount
            };

            return(ResultModel.Success(result));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public Task <IResultModel> Query([FromQuery] SkinQueryModel model)
 {
     return(_service.Query(model));
 }