示例#1
0
 public void UpdateLocalRegion()
 {
     m_isUpdateLocalOrGlobal = true;
     m_criteria = UtilityHelper.DeepClone(GridSearchArea.DataContext as CategoryQueryModel);
     m_queryLogConfigClient.GetLocalRegionAsync(new LogLocalQueryCriteria
     {
         GlobalID = m_criteria != null ? m_criteria.GlobalID : null
     });
 }
示例#2
0
        public async Task <IResultModel> Query(CategoryQueryModel model)
        {
            var result = new QueryResultModel <CategoryEntity>
            {
                Rows  = await _repository.Query(model),
                Total = model.TotalCount
            };

            return(ResultModel.Success(result));
        }
        public async Task <IList <CategoryEntity> > Query(CategoryQueryModel model)
        {
            var paging = model.Paging();

            var query = Db.Find();

            if (!paging.OrderBy.Any())
            {
                query.OrderByDescending(m => m.Sort);
            }

            var result = await query.PaginationAsync(paging);

            model.TotalCount = paging.TotalCount;

            return(result);
        }
        public async Task <IList <CategoryEntity> > Query(CategoryQueryModel model)
        {
            var paging = model.Paging();

            var query = Db.Find();

            if (!paging.OrderBy.Any())
            {
                query.OrderByDescending(m => m.Id);
            }

            var result = await query.LeftJoin <AccountEntity>((x, y) => x.CreatedBy == y.Id)
                         .Select((x, y) => new { x, Creator = y.Name })
                         .PaginationAsync(paging);

            model.TotalCount = paging.TotalCount;

            return(result);
        }
示例#5
0
 public Task <IResultModel> Query([FromQuery] CategoryQueryModel model)
 {
     return(_service.Query(model));
 }