Exemple #1
0
        public ActionResult Create(TaskFormViewModel newTask)
        {
            if (newTask != null)
            {
                var task = Mapper.Map <TaskFormViewModel, TaskToDo>(newTask);
                _taskService.CreateTask(task);
                _taskService.SaveTask();
            }

            return(RedirectToAction("Index"));
        }