public IActionResult Create() { var repairCars = _repairCarRepository.GetAll(); var vmRepairCars = new CarViewModel(); foreach (var repairCar in repairCars) { vmRepairCars.ListRepairCar.Add( new SelectListItem { Text = repairCar.Description, Value = repairCar.RepairCost.ToString() }); } return(View(vmRepairCars)); }
public IActionResult Index() { var repairs = _repairCarRepository.GetAll(); return(View(repairs)); }