public ActionResult CreateModel(Task task) { TaskDal taskDal = new TaskDal(); if (taskDal.AddUser(task) > 0) { return(RedirectToAction("Index")); } else { return(RedirectToAction("Create")); } }