// GET: Vehicle/Delete/5 public IActionResult Delete(int?id) { if (id == null) { return(BadRequest()); } var vehicle = VehicleManager.Find(v => v.Id == id); if (vehicle == null) { return(NotFound()); } return(View(vehicle)); }