public IActionResult Get(string id) { var vehicle = db.FindVehicle(id); if (vehicle == default) { return(NotFound($"Sorry, there's no car with registration {id} in our system.")); } var result = vehicle.ToResource(); return(Ok(result)); }
public IActionResult Details(string id) { var vehicle = db.FindVehicle(id); return(View(vehicle)); }
public Vehicle Get(string id) { return(db.FindVehicle(id)); }