Exemplo n.º 1
0
 public IHttpActionResult GetCourse(int id)
 {
     try
     {
         return(Ok(_service.GetCourseById(id)));
     }
     catch (NotFoundException)
     {
         return(NotFound());
     }
     catch (DbException)
     {
         return(InternalServerError());
     }
 }