public ActionResult Create(Teacher teacher) { if (ModelState.IsValid) { service.Add(teacher); return RedirectToAction("Index"); } BaseService.Dictionaries.FillAllDictionaries(teacher); return View(teacher); }
public ActionResult Edit(Teacher teacher) { if (ModelState.IsValid) { service.Edit(teacher); return RedirectToAction("Index"); } return View(teacher); }