Exemple #1
0
        public async Task CreateOrderItemAsync(long orderId, List <CreateOrderItemModel> model)
        {
            model.ForEach(item =>
            {
                item.OrderId = orderId;
            });

            var orderItems = _autoMapper.Map <List <OrderItem> >(model);

            await _orderItemRepository.AddRangeAsync(orderItems);
        }