public async Task UpdateAsync(LimitOrder limitOrder) { var entity = new LimitOrderEntity(GetPartitionKey(limitOrder.AssetPairId), GetRowKey(limitOrder.Id)); Mapper.Map(limitOrder, entity); await _storage.InsertOrMergeAsync(entity); }
public async Task AddAsync(LimitOrder order) { var entity = new LimitOrderEntity(GetPartitionKey(order.AssetPairId), GetRowKey(order.Id)); Mapper.Map(order, entity); await _storage.InsertAsync(entity); }
public async Task AddOrUpdateBatchAsync(IEnumerable <LimitOrder> orders) { var models = orders.Select(x => { var entity = new LimitOrderEntity(GetPartitionKey(x.AssetPairId), GetRowKey(x.Id)); Mapper.Map(x, entity); return(entity); }); await _storage.InsertOrMergeBatchAsync(models); }