public ViewResult RsvpForm(Response response) { response.Events = repositoryEvent.GetEvent(response.EventID); if (ModelState.IsValid) { if (!repository.IsRegistered(response)) { repository.AddResponse(response); return(View("Registered", response)); } else { TempData["message"] = $"{response.Email} is already registered to this event."; return(View(response)); } } else { return(View(response)); } }