예제 #1
0
        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"));
        }
예제 #2
0
 public void UpdateCar(Car car)
 {
     carDAL.UpdateCar(car);
 }