public IActionResult Add(Registration registration) { if (ModelState.IsValid) { _repository.AddRegistration(registration); return(RedirectToAction("Detail", new { id = registration.Id })); } return(View(registration)); }