예제 #1
0
 public static IndexInformationTableEntity Create(IIndexInformation src)
 {
     return(new IndexInformationTableEntity
     {
         PartitionKey = GeneratePartitionKey(),
         RowKey = GenerateRowKey(src.AssetPair),
         Source = src.Source,
         Ask = src.Ask,
         Bid = src.Bid,
         Timestamp = src.Timestamp.ToString("O"),
         AssetsInfo = src.AssetsInfo.Select(IndexAssetInfo.Create).ToArray()
     });
 }
예제 #2
0
 public async ValueTask UpdateAsync(IIndexInformation data)
 {
     var newEntity = IndexInformationTableEntity.Create(data);
     await _dbTable.InsertOrReplaceAsync(newEntity);
 }