public async Task <List <OperativeResponse> > ExecuteAsync(OperativeRequest searchModel)
        {
            var filter          = _filterBuilder.BuildFilter(searchModel);
            var gatewayResponse = await _operativesGateway.ListByFilterAsync(filter);

            return(gatewayResponse.Select(e => e.ToResponse()).ToList());
        }
Пример #2
0
 Update.IWhere Update.ISet.Where(IFilterBuilder filter)
 {
     _where = new List <string>()
     {
         filter.BuildFilter()
     };
     return(this);
 }
        public Task <AzureTableQueryResult> ExecuteQueryAsync(string tableName, IFilterBuilder filterBuilder, string propertyFilter, Func <AzureTablePropertyBag, bool> clientSideFilter, DateTimeOffset startTime, DateTimeOffset endTime, int count, CancellationToken token)
        {
            if (filterBuilder == null)
            {
                throw new ArgumentNullException("filterBuilder");
            }

            return(this.ExecuteQueryAsyncInternal(tableName, filterBuilder.BuildFilter(propertyFilter, startTime, endTime), clientSideFilter, count, token));
        }
Пример #4
0
        public async Task <IEnumerable <WorkOrder> > Execute(WorkOrderSearchParameters searchParameters)
        {
            var filter     = _filterBuilder.BuildFilter(searchParameters);
            var workOrders = await _repairsGateway.GetWorkOrders(filter, searchParameters.IncludeHistorical);

            workOrders = EnsureSorting(searchParameters, workOrders);

            if (searchParameters.PageSize == 0)
            {
                return(workOrders);
            }

            return(workOrders
                   .Skip((searchParameters.PageNumber - 1) * searchParameters.PageSize)
                   .Take(searchParameters.PageSize));
        }
Пример #5
0
 Update.IWhere Update.IWhere.Or(IFilterBuilder filter)
 {
     _where.Add($"OR {filter.BuildFilter()}");
     return(this);
 }
Пример #6
0
 public IFilter Or(IFilterBuilder filter)
 {
     _filters = alignList();
     _filters.Add($"OR {filter.BuildFilter()}");
     return(this);
 }
Пример #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="filter">initial filter</param>
 public FilterBuilder(IFilterBuilder filter)
 {
     _filters.Add(filter.BuildFilter());
 }