public ActionResult DeleteConfirmed(int id) { RefreshmentItem refreshment = db.RefreshmentItems.Find(id); db.RefreshmentItems.Remove(refreshment); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(RefreshmentItem refreshment) { if (ModelState.IsValid) { db.Entry(refreshment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(refreshment)); }
public ActionResult Create(RefreshmentItem refreshment) { if (ModelState.IsValid) { db.RefreshmentItems.Add(refreshment); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(refreshment)); }
// // GET: /Meal/Delete/5 public ActionResult Delete(int id) { RefreshmentItem refreshment = db.RefreshmentItems.Find(id); return(View(refreshment)); }
// // GET: /Meal/Details/5 public ViewResult Details(int id) { RefreshmentItem refreshment = db.RefreshmentItems.Find(id); return(View(refreshment)); }