public ActionResult<Vehicle> GetVehicle(int id) { var vehicle = _vehicleBusiness.Get(id); if (vehicle == null) return NotFound(); return vehicle; }
public ActionResult <Vehicle> Get(int id) { try { Vehicle vehicle = _vehicleBusiness.Get(id); return(Ok(vehicle)); } catch (Exception e) { return(StatusCode(500, e.Message)); } }