Beispiel #1
0
 public ActionResult <List <CollegeNameId> > GetCollegeNames()
 {
     try
     {
         var colleges = collegeService.GetAllCollegeNamesId();
         if (colleges == null)
         {
             return(NotFound("No colleges are registered"));
         }
         return(colleges);
     }
     catch (Exception e)
     {
         return(StatusCode(500, e));
     }
 }