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