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