public ActionResult Assignments(int?id) { if (id == null) { throw new MissingIdException(); } var asi = _assignmentService.GetAssignmentsInCourse(id.Value); if (asi.Count == 0) { throw new NoAssignmentsInCourseException(); } return(View(asi)); }