public IHttpActionResult GetStudentInCourse(int id, string ssn) { try { return(Ok(_service.GetStudentInCourse(id, ssn))); } catch (CourseNotFoundException) { throw new HttpResponseException(HttpStatusCode.NotFound); } catch (StudentNotFoundException) { throw new HttpResponseException(HttpStatusCode.NotFound); } }