public ActionResult EditTeacher(int id) { CreateT model = new CreateT() { Positions = db.Positions.ToList(), Teacher = db.Teachers.FirstOrDefault(t => t.Id == id), Action = "EditTeacher" }; return(View("CrtTeacher", model)); }
public ActionResult CrtTeacher() { CreateT model = new CreateT() { Positions = db.Positions.ToList(), Teacher = null, Action = "CreateTeacher" }; return(View(model)); }