예제 #1
0
        public async Task SaveTradeAsync(Trade trade)
        {
            var          item       = Mapping.Mapper.Map <TradeAdapter>(trade);
            TradeAdapter checkExist = _ordersAdapter.Find(x => x.TradeId.Equals(item.TradeId)).FirstOrDefault();

            _ordersAdapter.Upsert(item);
        }
예제 #2
0
        public async Task SaveTradesAsync(List <Trade> trades)
        {
            var items = Mapping.Mapper.Map <List <TradeAdapter> >(trades);

            foreach (var item in items)
            {
                TradeAdapter checkExist = _ordersAdapter.Find(x => x.TradeId.Equals(item.TradeId)).FirstOrDefault();
                _ordersAdapter.Upsert(item);
            }
        }