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

            return View(personList);
        }
Exemplo 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");
        }
Exemplo n.º 3
0
 public ActionResult List(PersonInputModel person)
 {
     var service = new PersonService();
     var people = service.GetPeopleByBirthdate(person.Birthdate);
     return View(people);
 }