コード例 #1
0
 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);
     }
 }