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