public async Task <IActionResult> UpdateCar(Cars updatedcar) { Cars oldcar = await _car.GetCar(updatedcar.Id); oldcar.Model = updatedcar.Model; oldcar.Make = updatedcar.Make; oldcar.Year = updatedcar.Year; oldcar.Color = updatedcar.Color; _car.UpdateCar(oldcar); return(RedirectToAction("SearchIndex")); }
public void UpdateCar(Car car) { carDAL.UpdateCar(car); }