コード例 #1
0
 public ActionResult <SpeciesModel> Read(int id)
 {
     try
     {
         return(Ok(_repository.Read(id)));
     }
     catch (Exception ex)
     {
         _logger.LogError($"Error: Controller exception on Read(int id)");
         return(StatusCode((int)HttpStatusCode.InternalServerError, new { Error = ex.Message }));
     }
 }