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