Esempio n. 1
0
        public async Task <HedgeLimitOrder> GetByIdAsync(string hedgeLimitOrderId)
        {
            HedgeLimitOrderEntity entity =
                await _storage.GetDataAsync(GetPartitionKey(hedgeLimitOrderId), GetRowKey(hedgeLimitOrderId));

            return(Mapper.Map <HedgeLimitOrder>(entity));
        }
Esempio n. 2
0
        public Task InsertAsync(HedgeLimitOrder hedgeLimitOrder)
        {
            var entity = new HedgeLimitOrderEntity(GetPartitionKey(hedgeLimitOrder.Id), GetRowKey(hedgeLimitOrder.Id));

            Mapper.Map(hedgeLimitOrder, entity);

            return(_storage.InsertAsync(entity));
        }
Esempio n. 3
0
        public async Task InsertAsync(IEnumerable <HedgeLimitOrder> hedgeLimitOrders)
        {
            foreach (HedgeLimitOrder hedgeLimitOrder in hedgeLimitOrders)
            {
                var entity = new HedgeLimitOrderEntity(GetPartitionKey(hedgeLimitOrder.Id),
                                                       GetRowKey(hedgeLimitOrder.Id));

                Mapper.Map(hedgeLimitOrder, entity);

                await _storage.InsertAsync(entity);
            }
        }