// GET: ProjectTasks public ActionResult Index() { if (coursesRepository.IsTeacherInAnyCourse(User.Identity.GetUserId(), User.IsInRole("Administrator"))) { ViewBag.IsTeacher = true; } if (User.IsInRole("Administrator")) { return(View(projectTasksRepository.GetAllProjectTasks())); } return(View(projectTasksRepository.GetAllProjectTasksForUserId(User.Identity.GetUserId()))); }
public IEnumerable <ProjectTask> Get() { return(ProjectTasksRepository.GetAllProjectTasks()); }
public IEnumerable <ProjectTaskViewModel> Get() { return(repository.GetAllProjectTasks()); }