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