public ActionResult <VehicleModel> 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 }));
     }
 }
Example #2
0
 public Vehicle Read(long id)
 {
     return(vehiclesRepository.Read(id));
 }