public async Task <IEnumerable <ICustomerChecksInfo> > GetBatch(int count, string separatingClientId = null)
        {
            if (separatingClientId == null)
            {
                return(await _tableStorage.WhereAsync(new TableQuery <CustomerChecksInfoEntity>().Take(count)));
            }

            var partitionKey = CustomerChecksInfoEntity.GeneratePartitionKey(separatingClientId);
            var rowKey       = CustomerChecksInfoEntity.GenerateRowKey(separatingClientId);

            var query = new TableQuery <CustomerChecksInfoEntity>()
                        .Where(TableQuery.CombineFilters(
                                   TableQuery.GenerateFilterCondition(
                                       nameof(ITableEntity.PartitionKey),
                                       QueryComparisons.GreaterThanOrEqual,
                                       partitionKey),
                                   TableOperators.And,
                                   TableQuery.GenerateFilterCondition(
                                       nameof(ITableEntity.RowKey),
                                       QueryComparisons.GreaterThan,
                                       rowKey)
                                   )).Take(count);

            return(await _tableStorage.WhereAsync(query));
        }
Ejemplo n.º 2
0
		public async Task<IReadOnlyList<IOvernightSwapHistory>> GetAsync(DateTime? @from, DateTime? to)
		{
			return (await _tableStorage.WhereAsync(AzureStorageUtils.QueryGenerator<OvernightSwapHistoryEntity>.RowKeyOnly
					.BetweenQuery(from ?? DateTime.MinValue, to ?? DateTime.MaxValue, ToIntervalOption.IncludeTo)))
				.OrderByDescending(item => item.Time)
				.ToList();
		}
        public async Task <IReadOnlyCollection <AssetRealisedPnL> > GetAsync(string walletId, string assetId, DateTime date,
                                                                             int?limit)
        {
            string filterByPk = TableQuery.GenerateFilterCondition(nameof(AssetRealisedPnLEntity.PartitionKey),
                                                                   QueryComparisons.Equal, GetPartitionKey(walletId));

            string filterByPeriod = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition(nameof(AssetRealisedPnLEntity.RowKey), QueryComparisons.GreaterThan,
                                                   GetRowKey(date.Date.AddDays(1))),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(nameof(AssetRealisedPnLEntity.RowKey), QueryComparisons.LessThan,
                                                   GetRowKey(date.Date.AddMilliseconds(-1))));

            string filterByAssetId = TableQuery.GenerateFilterCondition(nameof(AssetRealisedPnLEntity.AssetId),
                                                                        QueryComparisons.Equal, assetId);

            string filter = TableQuery.CombineFilters(filterByPk, TableOperators.And, filterByPeriod);

            filter = TableQuery.CombineFilters(filter, TableOperators.And, filterByAssetId);

            var query = new TableQuery <AssetRealisedPnLEntity>().Where(filter).Take(limit);

            IEnumerable <AssetRealisedPnLEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <List <AssetRealisedPnL> >(entities));
        }
        public async Task <IReadOnlyList <IndexHistory> > GetAsync(DateTime from, DateTime to)
        {
            var filter = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.GreaterThan,
                                                   GetPartitionKey(to)),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.LessThanOrEqual,
                                                   GetPartitionKey(from)));

            var query = new TableQuery <IndexHistoryEntity>().Where(filter);

            var models = await _storage.WhereAsync(query);

            var domain = models.OrderBy(x => x.Time)
                         .Select(x =>
                                 new IndexHistory(
                                     x.Value,
                                     Mapper.Map <AssetMarketCap[]>(x.MarketCaps),
                                     x.Weights,
                                     new List <TickPrice>(),
                                     new List <AssetPrice>(),
                                     x.MiddlePrices,
                                     x.Time,
                                     Mapper.Map <AssetSettings[]>(x.AssetsSettings)))
                         .ToList();

            return(domain);
        }
        public async Task <IEnumerable <ICashOutRequest> > GetHistoryRecordsAsync(DateTime @from, DateTime to)
        {
            to = to.Date.AddDays(1);
            var partitionKey = CashOutAttemptEntity.HistoryRecords.GeneratePartition();

            return(await _tableStorage.WhereAsync(partitionKey, from, to, ToIntervalOption.ExcludeTo));
        }
Ejemplo n.º 6
0
 public async Task <IReadOnlyList <IAccountBalanceChange> > GetAsync(string accountId, DateTime? @from = null,
                                                                     DateTime?to = null, AccountBalanceChangeReasonType?reasonType = null, bool filterByTradingDay = false)
 {
     return((await _tableStorage.WhereAsync(accountId, from ?? DateTime.MinValue,
                                            to?.Date.AddDays(1) ?? DateTime.MaxValue, ToIntervalOption.IncludeTo,
                                            x => reasonType == null || x.ReasonType == reasonType.ToString()))
            .OrderByDescending(item => item.ChangeTimestamp).ToList());
 }
Ejemplo n.º 7
0
        public static Task <IEnumerable <T> > WhereAsync <T>(this INoSQLTableStorage <T> tableStorage, string partitionKey,
                                                             DateTime from, DateTime to, ToIntervalOption intervalOption, Func <T, bool> filter = null, bool includeTime = false)
            where T : ITableEntity, new()
        {
            var rangeQuery = QueryGenerator <T> .BetweenQuery(partitionKey, from, to, intervalOption, includeTime);

            return(filter == null
                                ? tableStorage.WhereAsync(rangeQuery)
                                : tableStorage.WhereAsync(rangeQuery, filter));
        }
Ejemplo n.º 8
0
        public async Task <IEnumerable <IClientRegulation> > GetByRegulationIdAsync(string regulationId)
        {
            string rowKeyFilter = TableQuery
                                  .GenerateFilterCondition(nameof(ClientRegulationEntity.RowKey), QueryComparisons.Equal,
                                                           GetRowKey(regulationId));

            var query = new TableQuery <ClientRegulationEntity>().Where(rowKeyFilter);

            return(await _tableStorage.WhereAsync(query));
        }
Ejemplo n.º 9
0
        // TODO: Need refactoring
        public async Task <IInvoice> GetAsync(string invoiceId)
        {
            string filter = TableQuery
                            .GenerateFilterCondition(nameof(InvoiceEntity.RowKey), QueryComparisons.Equal, GetRowKey(invoiceId));

            var query = new TableQuery <InvoiceEntity>().Where(filter);

            IEnumerable <InvoiceEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <Invoice>(entities.FirstOrDefault()));
        }
Ejemplo n.º 10
0
        public async Task <MarketOrder> GetByIdAsync(string marketOrderId)
        {
            string filter = TableQuery.GenerateFilterCondition(nameof(ITableEntity.RowKey), QueryComparisons.Equal,
                                                               GetRowKey(marketOrderId));

            var query = new TableQuery <MarketOrderEntity>().Where(filter);

            IEnumerable <MarketOrderEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <MarketOrder>(entities.SingleOrDefault()));
        }
Ejemplo n.º 11
0
        public static Task <IEnumerable <T> > WhereAsync <T>(this INoSQLTableStorage <T> tableStorage, string partitionKey,
                                                             int year, int month, Func <T, bool> filter = null)
            where T : ITableEntity, new()
        {
            var from = new DateTime(year, month, 1);
            var to   = from.AddMonths(1);

            var rangeQuery = QueryGenerator <T> .BetweenQuery(partitionKey, from, to, ToIntervalOption.ExcludeTo);

            return(filter == null
                ? tableStorage.WhereAsync(rangeQuery)
                : tableStorage.WhereAsync(rangeQuery, filter));
        }
Ejemplo n.º 12
0
        public async Task ProcessItemsFromYesterdayAsync(DateTime start, Func <IEnumerable <FeedHistoryEntity>, Task> batchHandler)
        {
            try
            {
                var assetPairs = await _assetsService.AssetPairGetAllAsync();

                _lastAssetPairIds = assetPairs
                                    .Select(i => i.Id)
                                    .Where(i => i.IsValidPartitionOrRowKey())
                                    .ToList();
            }
            catch (Exception ex)
            {
                _log.WriteWarning(nameof(CandlestiсksRepository), start, ex.Message);
            }

            if (_lastAssetPairIds == null || _lastAssetPairIds.Count == 0)
            {
                string queryText = GenerateQueryWithoutPartition(start);
                var    query     = new TableQuery <FeedHistoryEntity>().Where(queryText);
                var    items     = await _storage.WhereAsync(query);
                await batchHandler(items);
            }
            else
            {
                foreach (var assetPairId in _lastAssetPairIds)
                {
                    (string pk1, string pk2) = GetPartiotionsForAssetPair(assetPairId);

                    string queryText = GenerateQueryForPartition(start, pk1);
                    var    query     = new TableQuery <FeedHistoryEntity>().Where(queryText);
                    var    items     = await _storage.WhereAsync(query);

                    if (items.Any())
                    {
                        await batchHandler(items);
                    }

                    queryText = GenerateQueryForPartition(start, pk2);
                    query     = new TableQuery <FeedHistoryEntity>().Where(queryText);
                    items     = await _storage.WhereAsync(query);

                    if (items.Any())
                    {
                        await batchHandler(items);
                    }
                }
            }
        }
        public async Task <IEnumerable <ICandle> > GetCandlesAsync(CandlePriceType priceType, CandleTimeInterval interval, DateTime from, DateTime to)
        {
            if (priceType == CandlePriceType.Unspecified)
            {
                throw new ArgumentException(nameof(priceType));
            }

            var query    = GetTableQuery(priceType, interval, from, to);
            var entities = await _tableStorage.WhereAsync(query);

            var candles = entities
                          .SelectMany(e => e.Candles.Select(ci => ci.ToCandle(_assetPairId, e.PriceType, e.DateTime, interval)));

            return(candles.Where(c => c.Timestamp >= from && c.Timestamp < to));
        }
Ejemplo n.º 14
0
        public async Task <IReadOnlyCollection <InternalOrder> > GetByPeriodAsync(DateTime startDate, DateTime endDate,
                                                                                  int limit)
        {
            string filter = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.GreaterThan,
                                                   GetPartitionKey(endDate.Date.AddDays(1))),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.LessThan,
                                                   GetPartitionKey(startDate.Date.AddMilliseconds(-1))));

            var query = new TableQuery <InternalOrderEntity>().Where(filter).Take(limit);

            IEnumerable <InternalOrderEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <List <InternalOrder> >(entities));
        }
Ejemplo n.º 15
0
        public async Task <IReadOnlyCollection <BalanceOperation> > GetAsync(DateTime startDate, DateTime endDate,
                                                                             int limit, string assetId, BalanceOperationType balanceOperationType)
        {
            string filter = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.GreaterThan,
                                                   GetPartitionKey(endDate.Date.AddDays(1))),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(nameof(AzureTableEntity.PartitionKey), QueryComparisons.LessThan,
                                                   GetPartitionKey(startDate.Date.AddMilliseconds(-1))));

            if (!string.IsNullOrEmpty(assetId))
            {
                filter = TableQuery.CombineFilters(filter, TableOperators.And,
                                                   TableQuery.GenerateFilterCondition(nameof(BalanceOperationEntity.AssetId),
                                                                                      QueryComparisons.Equal, assetId));
            }

            if (balanceOperationType != BalanceOperationType.None)
            {
                filter = TableQuery.CombineFilters(filter, TableOperators.And,
                                                   TableQuery.GenerateFilterCondition(nameof(BalanceOperationEntity.Type),
                                                                                      QueryComparisons.Equal, balanceOperationType.ToString()));
            }

            var query = new TableQuery <BalanceOperationEntity>().Where(filter).Take(limit);

            IEnumerable <BalanceOperationEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <List <BalanceOperation> >(entities));
        }
        public async Task <IEnumerable <IAccountMarginEventReport> > GetAsync(DateTime?dtFrom, DateTime?dtTo)
        {
            var partitionKeys = await GetPartitionKeys();

            return((await _tableStorage.WhereAsync(partitionKeys, dtFrom ?? DateTime.MinValue, dtTo ?? DateTime.MaxValue, ToIntervalOption.IncludeTo))
                   .OrderByDescending(item => item.EventTime));
        }
        private static async Task FetchDataAsync <T>(
            string partitionValue,
            string filter,
            int allCount,
            INoSQLTableStorage <T> storage,
            List <T> items,
            ILog log)
            where T : class, ITableEntity, new()
        {
            if (!string.IsNullOrWhiteSpace(partitionValue))
            {
                string partitionFilter = TableQuery.GenerateFilterCondition(_partitionKey, QueryComparisons.Equal, partitionValue);
                filter = TableQuery.CombineFilters(partitionFilter, TableOperators.And, filter);
            }
            var query       = new TableQuery <T>().Where(filter);
            int countBefore = items.Count;
            var data        = await storage.WhereAsync(query);

            items.AddRange(data);

            /*if (items.Count - countBefore > 0)
             *  log.WriteInfo(
             *      nameof(BatchHelper),
             *      nameof(BatchGetDataAsync),
             *      $"Fetched batch of {items.Count - countBefore} items. Processed {allCount}.");*/
        }
Ejemplo n.º 18
0
        public async Task <IEnumerable <IFeedCandle> > GetCandlesAsync(PriceType priceType, TimeInterval interval, DateTime from, DateTime to)
        {
            if (priceType == PriceType.Unspecified)
            {
                throw new ArgumentException(nameof(priceType));
            }

            var partitionKey = CandleTableEntity.GeneratePartitionKey(priceType);
            var rowKeyFrom   = CandleTableEntity.GenerateRowKey(from, interval);
            var rowKeyTo     = CandleTableEntity.GenerateRowKey(to, interval);

            var query      = new TableQuery <CandleTableEntity>();
            var pkeyFilter = TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey);

            var rowkeyCondFrom = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.GreaterThanOrEqual, rowKeyFrom);
            var rowkeyCondTo   = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.LessThanOrEqual, rowKeyTo);
            var rowkeyFilter   = TableQuery.CombineFilters(rowkeyCondFrom, TableOperators.And, rowkeyCondTo);

            query.FilterString = TableQuery.CombineFilters(pkeyFilter, TableOperators.And, rowkeyFilter);

            var entities = await _tableStorage.WhereAsync(query);

            var result = from e in entities
                         select e.Candles.Select(ci => ci.ToCandle(e.PriceType == PriceType.Bid, e.DateTime, interval));

            return(result
                   .SelectMany(c => c)
                   .Where(c => c.DateTime >= from && c.DateTime < to));
        }
Ejemplo n.º 19
0
        public async Task <IReadOnlyList <IEventHistory> > GetEventHistoryData(DateTime date, string exchange, string assetPair, decimal?delta)
        {
            var dateFilter = TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, GeneratePartitionKey(date));

            //var timeFilter = TableQuery.CombineFilters(
            //    TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.GreaterThanOrEqual, GenerateRowKey(from)),
            //    TableOperators.And,
            //    TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.LessThanOrEqual, GenerateRowKey(to))
            //);

            //var combinedFilter = TableQuery.CombineFilters(dateFilter, TableOperators.And, timeFilter);
            var combinedFilter = dateFilter;

            combinedFilter = !string.IsNullOrWhiteSpace(exchange)
                ? TableQuery.CombineFilters(combinedFilter, TableOperators.And, TableQuery.GenerateFilterCondition("Exchange", QueryComparisons.Equal, exchange.ToUpperInvariant()))
                : combinedFilter;

            combinedFilter = !string.IsNullOrWhiteSpace(assetPair)
                ? TableQuery.CombineFilters(combinedFilter, TableOperators.And, TableQuery.GenerateFilterCondition("AssetPair", QueryComparisons.Equal, assetPair.ToUpperInvariant()))
                : combinedFilter;

            combinedFilter = delta.HasValue
                ? TableQuery.CombineFilters(combinedFilter, TableOperators.And, TableQuery.GenerateFilterCondition("Delta", QueryComparisons.Equal, delta.Value.ToString(CultureInfo.InvariantCulture)))
                : combinedFilter;

            var query = new TableQuery <EventHistoryEntity>().Where(combinedFilter);

            return((await _storage.WhereAsync(query)).ToArray());
        }
Ejemplo n.º 20
0
        public async Task <IEnumerable <IRegistrationLogEvent> > GetAsync(DateTime @from, DateTime to)
        {
            var partitionKey = RegistrationLogEventEntity.GeneratePartitionKey();

            return
                (await _tableStorage.WhereAsync(partitionKey, @from.Date, to.Date.AddDays(1), ToIntervalOption.ExcludeTo));
        }
        public async Task <IReadOnlyCollection <InternalTrade> > GetAsync(DateTime startDate, DateTime endDate,
                                                                          string assetPairId, string oppositeWalletId, int limit)
        {
            string filter = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition(nameof(ITableEntity.PartitionKey), QueryComparisons.GreaterThan,
                                                   GetPartitionKey(endDate.Date.AddDays(1))),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(nameof(ITableEntity.PartitionKey), QueryComparisons.LessThan,
                                                   GetPartitionKey(startDate.Date.AddMilliseconds(-1))));

            if (!string.IsNullOrEmpty(assetPairId))
            {
                filter = TableQuery.CombineFilters(filter, TableOperators.And,
                                                   TableQuery.GenerateFilterCondition(nameof(InternalTradeEntity.AssetPairId),
                                                                                      QueryComparisons.Equal, assetPairId));
            }

            if (!string.IsNullOrEmpty(oppositeWalletId))
            {
                filter = TableQuery.CombineFilters(filter, TableOperators.And,
                                                   TableQuery.GenerateFilterCondition(nameof(InternalTradeEntity.OppositeWalletId),
                                                                                      QueryComparisons.Equal, oppositeWalletId));
            }

            var query = new TableQuery <InternalTradeEntity>().Where(filter).Take(limit);

            IEnumerable <InternalTradeEntity> entities = await _storage.WhereAsync(query);

            return(Mapper.Map <List <InternalTrade> >(entities));
        }
Ejemplo n.º 22
0
        public async Task <IEnumerable <IAuthorizationLogRecord> > GetAsync(string email, DateTime @from, DateTime to)
        {
            var partitionKey = AuthorizationLogRecordEntity.GeneratePartitionKey(email);

            return
                (await _tableStorage.WhereAsync(partitionKey, @from.Date, to.Date.AddDays(1), ToIntervalOption.ExcludeTo));
        }
Ejemplo n.º 23
0
        public static Task <IEnumerable <T> > GetDataRowKeyOnlyAsync <T>(this INoSQLTableStorage <T> tableStorage, string rowKey)
            where T : ITableEntity, new()
        {
            var query = QueryGenerator <T> .RowKeyOnly.GetTableQuery(rowKey);

            return(tableStorage.WhereAsync(query));
        }
Ejemplo n.º 24
0
        public async Task <IEnumerable <ITradingOrder> > GetAsync(DateTime?dtFrom, DateTime?dtTo)
        {
            var keys = await GetPartitionKeys();

            return((await _tableStorage.WhereAsync(keys, dtFrom ?? DateTime.MinValue, dtTo ?? DateTime.MaxValue, ToIntervalOption.IncludeTo))
                   .OrderByDescending(item => item.Timestamp));
        }
Ejemplo n.º 25
0
        private async Task UpdateIndexes(InventorySnapshotEntity inventorySnapshotEntity)
        {
            var existingIndex = await _indexStorage.GetDataAsync(GetIndexPartitionKey(inventorySnapshotEntity.Time),
                                                                 IndexForLastRowKey);

            if (existingIndex == null || (await _storage.GetDataAsync(existingIndex)).Time < inventorySnapshotEntity.Time)
            {
                // Update index for current day, it now must point to this the last received snapshot
                await _indexStorage.InsertOrReplaceAsync(
                    AzureIndex.Create(GetIndexPartitionKey(inventorySnapshotEntity.Time), IndexForLastRowKey,
                                      inventorySnapshotEntity));
            }

            // If we have index entries for any future date, they are now are invalid, we can just remove them,
            // as they will be reconstructed if needed

            var filter = TableQuery.GenerateFilterCondition(nameof(AzureIndex.PartitionKey),
                                                            QueryComparisons.GreaterThan,
                                                            GetIndexPartitionKey(inventorySnapshotEntity.Time));

            var query = new TableQuery <AzureIndex>().Where(filter);

            var allNowInvalidIndexEntriesFromTheFuture = (await _indexStorage.WhereAsync(query)).ToList();

            foreach (var indexEntity in allNowInvalidIndexEntriesFromTheFuture)
            {
                await _indexStorage.DeleteAsync(indexEntity);
            }
        }
        public async Task <IEnumerable <IFeedHistory> > GetLastTenMinutesAskAsync(string assetPairId)
        {
            var rangeQuery = AzureStorageUtils.QueryGenerator <FeedHistoryEntity>
                             .GreaterThanQuery(FeedHistoryEntity.GeneratePartition(assetPairId, PriceType.Ask),
                                               FeedHistoryEntity.GenerateRowKey(DateTime.UtcNow.AddMinutes(-10)));

            return((await _tableStorage.WhereAsync(rangeQuery)).Select(x => x.ToDto()));
        }
Ejemplo n.º 27
0
        public async Task <IReadOnlyList <Order> > GetAllAsync(string walletId, string assetPair, DateTime?timeFrom, DateTime?timeTo, int limit)
        {
            var query = new TableQuery <OrderEntity>().Where(BuildQuery(walletId, assetPair, timeFrom, timeTo)).Take(limit);

            var entities = await _storage.WhereAsync(query);

            return(Mapper.Map <IReadOnlyList <Order> >(entities));
        }
        public async Task <IReadOnlyList <IMessageLocalized> > GetAllTranslationByComponentAsync(string componentName)
        {
            TableQuery <MessageLocalizedEntity> query = new TableQuery <MessageLocalizedEntity>()
                                                        .Where(TableQuery.GenerateFilterCondition("Component", QueryComparisons.Equal, "componentName"));
            var entities = await _tableStorage.WhereAsync(query);

            return(entities.Cast <IMessageLocalized>().ToList());
        }
Ejemplo n.º 29
0
        public async Task <IEnumerable <IOffchainTransfer> > GetTransfersByOrder(string clientId, string orderId)
        {
            var query = new TableQuery <OffchainTransferEntity>()
                        .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, clientId))
                        .Where(TableQuery.GenerateFilterCondition("OrderId", QueryComparisons.Equal, orderId));

            return(await _storage.WhereAsync(query));
        }
Ejemplo n.º 30
0
        public async Task <IEnumerable <IRepositoryUpdateHistory> > GetAsyncByInitialCommit(string initialCommit)
        {
            string partitionFilter  = TableQuery.GenerateFilterCondition(nameof(RepositoryUpdateHistory.PartitionKey), QueryComparisons.Equal, RepositoryUpdateHistory.GeneratePartitionKey());
            string repositoryFilter = TableQuery.GenerateFilterCondition(nameof(RepositoryUpdateHistory.InitialCommit), QueryComparisons.Equal, initialCommit);
            string queryText        = TableQuery.CombineFilters(partitionFilter, TableOperators.And, repositoryFilter);
            var    query            = new TableQuery <RepositoryUpdateHistory>().Where(queryText);

            return(await _tableStorage.WhereAsync(query));
        }