示例#1
0
        public IActionResult Edit(Car car)
        {
            var carToEdit = logic.GetAll()
                            .FirstOrDefault(t => t.Id == car.Id);

            carToEdit.Model = car.Model;
            carToEdit.Price = car.Price;
            logic.Save();
            return(RedirectToAction(nameof(Dashboard)));
        }