public IActionResult UpdateDish(Dish fromForm, int DishId) { fromForm.DishId = DishId; _context.Update(fromForm); _context.Entry(fromForm).Property("CreatedAt").IsModified = false; _context.SaveChanges(); return(RedirectToAction("DishInfo")); }
public IActionResult EditDish(int DishId, Dish d) { dbContext.Update(d); return(Redirect("/")); }