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