public IActionResult Create(int?id)
        {
            Service service = new Service();

            if (id != null)
            {
                service.VehicleId = (int)id;
            }
            ViewData["VehicleId"] = new SelectList(_context.GetAllVehicles(), "Id", "Name");
            return(View(service));
        }
예제 #2
0
 public IActionResult Create()
 {
     ViewData["VehicleId"] = new SelectList(_context.GetAllVehicles(), "Id", "Name");
     return(View());
 }