Exemplo n.º 1
0
 public ActionResult <BeerType> GetByID(int ID)
 {
     try
     {
         BeerType beerType = BeerTypeService.GetTypeById(ID);
         if (beerType != null)
         {
             return(Ok(beerType));
         }
         return(NotFound());
     }
     catch (Exception ex)
     {
         return(StatusCode(500, $"Error loading beertype with ID: {ID}\nPlease try again later."));
     }
 }