コード例 #1
0
        public async Task UpdateAsync(LimitOrder limitOrder)
        {
            var entity = new LimitOrderEntity(GetPartitionKey(limitOrder.AssetPairId), GetRowKey(limitOrder.Id));

            Mapper.Map(limitOrder, entity);

            await _storage.InsertOrMergeAsync(entity);
        }
コード例 #2
0
        public async Task AddAsync(LimitOrder order)
        {
            var entity = new LimitOrderEntity(GetPartitionKey(order.AssetPairId), GetRowKey(order.Id));

            Mapper.Map(order, entity);

            await _storage.InsertAsync(entity);
        }
コード例 #3
0
        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);
        }