public ActionResult Edit(WeeklyDietEntry weeklydietentry) { if (ModelState.IsValid) { db.Entry(weeklydietentry).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(weeklydietentry); }
public ActionResult Create(WeeklyDietEntry weeklydietentry) { if (ModelState.IsValid) { db.WeeklyDietEntry.Add(weeklydietentry); db.SaveChanges(); return RedirectToAction("Index"); } return View(weeklydietentry); }