StockController update

This commit is contained in:
thermalthrottle
2021-03-18 23:59:05 +02:00
parent de738b7801
commit dbee01a94a

View File

@@ -66,7 +66,7 @@ namespace Business.Business.Sales
if (Amount > 0) if (Amount > 0)
{ {
productCtrl = new ProductController(currentUser); productCtrl = new ProductController(currentUser);
var productId = Get(productName); var productId = productCtrl.Get(productName).Id;
var stock = new Stock(currentUser.Id, productId , Amount); var stock = new Stock(currentUser.Id, productId , Amount);
context.Stock.Add(stock); context.Stock.Add(stock);
context.SaveChanges(); context.SaveChanges();