public void UpdateStock(storeNameWithStockModel storeWithStock) { var stock = context.stocks.Single(p => p.ID == storeWithStock.stockID); stock.amount = Convert.ToInt32(storeWithStock.stockAmount); context.SaveChanges(); }
public ActionResult UpdateStockBonus(storeNameWithStockModel storeNameWithStockModel) { stocksRepo.UpdateStock(storeNameWithStockModel); return(RedirectToAction("AllProducts")); }