public async Task InsertAsync(Price price) { var entity = new PriceEntity(GetPartitionKey(), GetRowKey(price.Id)); Mapper.Map(price, entity); await _storage.InsertThrowConflictAsync(entity); var latestEntity = new PriceEntity( GetLatestPartitionKey(price.AssetPair, price.Type), GetLatestRowKey(price.ValidFrom)); Mapper.Map(price, latestEntity); await _storage.InsertThrowConflictAsync(latestEntity); }
public async Task InsertAsync(PnLStopLossEngine pnLStopLossEngine) { var newEntity = new PnLStopLossEngineEntity(GetPartitionKey(), GetRowKey(pnLStopLossEngine.Id)); Mapper.Map(pnLStopLossEngine, newEntity); await _storage.InsertThrowConflictAsync(newEntity); }
public async Task InsertAsync(Instrument instrument) { var entity = new InstrumentEntity(GetPartitionKey(), GetRowKey(instrument.AssetPair)); Mapper.Map(instrument, entity); await _storage.InsertThrowConflictAsync(entity); }
public async Task InsertAsync(AssetPairLink assetPairLink) { var entity = new AssetPairLinkEntity(GetPartitionKey(), GetRowKey(assetPairLink.AssetPairId)); Mapper.Map(assetPairLink, entity); await _storage.InsertThrowConflictAsync(entity); }
public async Task InsertAsync(Trade trade) { var entity = new TradeEntity(GetPartitionKey(trade.CreationDateTime), GetRowKey(trade.Id)); Mapper.Map(trade, entity); await _storage.InsertThrowConflictAsync(entity); }
public async Task InsertAsync(Domain.AssetSettings assetSettings) { var entity = new AssetSettingsEntity(GetPartitionKey(), GetRowKey(assetSettings.AssetId)); Mapper.Map(assetSettings, entity); await _storage.InsertThrowConflictAsync(entity); }
public async Task InsertAsync(Order order) { var entity = new OrderEntity(GetPartitionKey(order.WalletId), GetRowKey(order.Id)); Mapper.Map(order, entity); await _storage.InsertThrowConflictAsync(entity); var index = new AzureIndex(GetIndexPartitionKey(order.Status), GetIndexRowKey(order.Id), entity); await _indices.InsertAsync(index); }