public ActionResult Index(Application application) { if (ModelState.IsValid) { var repo = new ApplicantDatabase(); repo.Add(application); return RedirectToAction("ThankYou"); } return View(application); }
public ActionResult Form(Application application) { if (ModelState.IsValid) { var repo = new ApplicantDatabase(); repo.Add(application); // string name = application.Name; return RedirectToAction("ThankYou", application); } return View(application); }