public ActionResult TraineeForm(Trainee model) { if (ModelState.IsValid) { return RedirectToAction("Statistics"); } return View(); }
public ActionResult Create(Trainee trainee) { if (ModelState.IsValid) { db.Trainees.Add(trainee); db.SaveChanges(); return RedirectToAction("Index"); } return View(trainee); }
public ActionResult Edit(Trainee trainee) { if (ModelState.IsValid) { db.Entry(trainee).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(trainee); }