Ejemplo n.º 1
0
 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"));
 }
Ejemplo n.º 2
0
 public IActionResult EditDish(int DishId, Dish d)
 {
     dbContext.Update(d);
     return(Redirect("/"));
 }