public ActionResult CourseDelete(CourseModel model) { CourseServices services = new CourseServices(); model.Tasks = services.GetTasks(model.CourseId); services.CourseDelete(model); return(RedirectToAction("Index", "Teacher")); }