public IActionResult Index(TaskViewModel model) { if (!string.IsNullOrEmpty(model.Title) && !string.IsNullOrEmpty(model.Descripton)) { Task taskToAdd = new Task() { UserId = model.UserId, Title = model.Title, Descripton = model.Descripton, Status = model.Status, Importance = model.Importance, Type = model.Type }; _taskRepository.CreateNewTask(taskToAdd); } return(RedirectToAction("Index", "Home")); }