Ejemplo n.º 1
0
        public ActionResult Index(string newDescription)
        {
            var toDoViewModel = new ToDoCollectionViewModel();

            if (!string.IsNullOrEmpty(newDescription))
            {
                toDoViewModel.Added = _toDoService.AddNewToDo(newDescription);
            }

            toDoViewModel.ToDoCollection = _toDoService.GetAll();

            return(View(toDoViewModel));
        }