Exemplo n.º 1
0
        public ActionResult Create()
        {
            var model = new TaskViewModel
            {
                PersonSelectList = new SelectList(_personService.GetAll(), "Id", "Name"),
                DeliveryDate     = DateTime.Now.AddDays(1)
            };

            return(View("Form", model));
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            var people          = _personService.GetAll();
            var peopleViewModel = this.ConvertEntity <IEnumerable <Person>, IEnumerable <PersonViewModel> >(people);

            return(View(peopleViewModel));
        }