コード例 #1
0
        private async Task <IEnumerable <IWatchList> > ReLoadCustomWatchListToNoSqlCache(string clientId)
        {
            try
            {
                var data = await _customWatchListRepository.GetAllAsync(clientId);

                var list = data.Select(e => WatchListCustomNoSql.Create(clientId, e)).ToList();
                await _myNoSqlWriterCustom.CleanAndBulkInsertAsync(WatchListCustomNoSql.GeneratePartitionKey(clientId),
                                                                   list);

                return(list);
            }
            catch (Exception ex)
            {
                _log.Error(ex, $"Cannot execute CleanAndBulkInsertAsync in NoSql. ClientId: {clientId}");
                throw;
            }
        }
コード例 #2
0
 public async Task <IEnumerable <IWatchList> > GetAllCustomAsync(string userId)
 {
     return(await _customWatchListRepository.GetAllAsync(userId));
 }