public void Add(OrderInput orderInput)
        {
            var order = CreateOrder(orderInput);
            var lines = CreateLine(orderInput.Lines);

            order.AddLine(lines);

            _orderRepository.Add(order);
            _lineRepository.Add(lines);
        }
Beispiel #2
0
        //Thêm Brand mới vào bảng Line
        public async Task <bool> Add(LineDto model)
        {
            var Line = _mapper.Map <Line>(model);

            _repoLine.Add(Line);
            return(await _repoLine.SaveAll());
        }