public bool AddProductOrder(AddProductOrderDTO NewProductOrder) { using (var db = new SqlConnection(_connectionString)) { var OrderId = _orderRepo.FindCurrentOrder(NewProductOrder.UserId); var NewPO = new NewProductOrderDTO(); NewPO.OrderId = OrderId; NewPO.ProductId = NewProductOrder.ProductId; NewPO.QuantityOrdered = NewProductOrder.QuantityOrdered; NewPO.isShipped = false; return(_productOrderRepo.AddNewProductOrder(NewPO)); } }
public void Add(NewProductOrderDTO newProductOrder) { _repo.AddNewProductOrder(newProductOrder); }