Esempio n. 1
0
        public ActionResult Index()
        {
            PersonService service = new PersonService();
            var personList = service.GetPeople();

            return View(personList);
        }
Esempio n. 2
0
        public ActionResult Create([ModelBinder(typeof(PersonModelBinder))]
            PersonViewModel viewModel)
        {
            if (!ModelState.IsValid) return View();

            PersonService service = new PersonService();
            service.Add(viewModel);

            return RedirectToAction("Index");
        }
Esempio n. 3
0
 public ActionResult List(PersonInputModel person)
 {
     var service = new PersonService();
     var people = service.GetPeopleByBirthdate(person.Birthdate);
     return View(people);
 }