public ActionResult Create() { var model = new TaskViewModel { PersonSelectList = new SelectList(_personService.GetAll(), "Id", "Name"), DeliveryDate = DateTime.Now.AddDays(1) }; return(View("Form", model)); }
public ActionResult Index() { var people = _personService.GetAll(); var peopleViewModel = this.ConvertEntity <IEnumerable <Person>, IEnumerable <PersonViewModel> >(people); return(View(peopleViewModel)); }