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