Ejemplo n.º 1
0
        public ActionResult<Vehicle> GetVehicle(int id)
        {
            var vehicle = _vehicleBusiness.Get(id);

            if (vehicle == null)
                return NotFound();

            return vehicle;
        }
Ejemplo n.º 2
0
 public ActionResult <Vehicle> Get(int id)
 {
     try
     {
         Vehicle vehicle = _vehicleBusiness.Get(id);
         return(Ok(vehicle));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }