Exemplo n.º 1
0
        public List <Lite <Entity> > GetEntitiesWithFilter(QueryEntitiesRequestTS request)
        {
            var qn = QueryLogic.ToQueryName(request.queryKey);
            var qd = DynamicQueryManager.Current.QueryDescription(qn);

            var filters = request.filters.EmptyIfNull().Select(f => f.ToFilter(qd, canAggregate: false)).ToList();

            return(DynamicQueryManager.Current.GetEntities(qn, filters).Take(request.count).ToList());
        }
Exemplo n.º 2
0
        public async Task <List <Lite <Entity> > > GetEntitiesWithFilter(QueryEntitiesRequestTS request, CancellationToken token)
        {
            var qn = QueryLogic.ToQueryName(request.queryKey);
            var qd = DynamicQueryManager.Current.QueryDescription(qn);

            return(await DynamicQueryManager.Current.GetEntities(new QueryEntitiesRequest
            {
                QueryName = qn,
                Count = request.count,
                Filters = request.filters.EmptyIfNull().Select(f => f.ToFilter(qd, canAggregate: false)).ToList(),
                Orders = request.orders.EmptyIfNull().Select(f => f.ToOrder(qd, canAggregate: false)).ToList(),
            }).ToListAsync());
        }
Exemplo n.º 3
0
 public async Task <List <Lite <Entity> > > GetEntitiesWithFilter([Required, FromBody] QueryEntitiesRequestTS request, CancellationToken token)
 {
     return(await QueryLogic.Queries.GetEntities(request.ToQueryEntitiesRequest()).ToListAsync());
 }
Exemplo n.º 4
0
        public List<Lite<Entity>> GetEntitiesWithFilter(QueryEntitiesRequestTS request)
        {
            var qn = QueryLogic.ToQueryName(request.queryKey);
            var qd = DynamicQueryManager.Current.QueryDescription(qn);

            var filters = request.filters.EmptyIfNull().Select(f => f.ToFilter(qd, canAggregate: false)).ToList();

            return DynamicQueryManager.Current.GetEntities(qn, filters).Take(request.count).ToList();
        }