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