public Order Create(Order order)
        {
            var entityOrder = _iMapper.Map <EntityOrder>(order);

            entityOrder.OrderId = _iDataServiceOrder.Create(entityOrder);
            return(_iMapper.Map <Order>(entityOrder));
        }
Esempio n. 2
0
        public async Task <Order> Create(Order order, CancellationToken cancellationToken)
        {
            var entityOrder = _iMapper.Map <EntityOrder>(order);

            entityOrder = await _iDataServiceOrder.Create(entityOrder, cancellationToken);

            return(_iMapper.Map <Order>(entityOrder));
        }