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