public ActionResult Index() { PersonService service = new PersonService(); var personList = service.GetPeople(); return View(personList); }
public ActionResult Create([ModelBinder(typeof(PersonModelBinder))] PersonViewModel viewModel) { if (!ModelState.IsValid) return View(); PersonService service = new PersonService(); service.Add(viewModel); return RedirectToAction("Index"); }
public ActionResult List(PersonInputModel person) { var service = new PersonService(); var people = service.GetPeopleByBirthdate(person.Birthdate); return View(people); }