public bool UpdateCar(int id, Car car) { if (car == null) { return(false); } var foundCar = repo.GetCar(id); if (foundCar == null) { throw new ApplicationException("Car doesn't exist"); } return(repo.UpdateCar(id, car)); }