Пример #1
0
        public async Task <IEnumerable <InternetSaleInfo> > GetInfoAsync(DateTime?from = null, DateTime?until = null)
        {
            ManageVaryHeader(this.HttpContext);
            var query = await InternetSalesDataAccess.GetInternetSaleInfosQueryAsync(_context, from, until);

            return(query);
        }
Пример #2
0
        public async Task <Stream> GetInternetSaleInfoStreamAsync(DateTime?from, DateTime?until)
        {
            var context = _serviceProvider.GetRequiredService <AdventureWorksContext>();

            var query = await InternetSalesDataAccess.GetInternetSaleInfosQueryAsync(context, from, until);

            return(new GZipStream(new DataStream <InternetSaleInfo>(query), CompressionLevel.Fastest));
        }
Пример #3
0
 public async Task <IEnumerable <InternetSaleInfo> > GetInternetSaleInfosAsync(DateTime?from, DateTime?until)
 {
     return(await Process(async context =>
     {
         var query = await InternetSalesDataAccess.GetInternetSaleInfosQueryAsync(context, from, until);
         return await query.ToListAsync();
     }));
 }
Пример #4
0
        public async Task <Stream> GetInfoStreamAsync(DateTime?from = null, DateTime?until = null)
        {
            var query = await InternetSalesDataAccess.GetInternetSaleInfosQueryAsync(_context, from, until);

            return(new DataStream <InternetSaleInfo>(query));
        }