Beispiel #1
0
        // Get /Vehicle/Edit/{Id}
        public IActionResult Edit(int Id)
        {
            var Vehicle = svc.GetVehicleById(Id);

            if (Vehicle != null)
            {
                var vvm = new VehicleViewModel();
                vvm.FromVehicle(Vehicle);
                return(View(vvm));
            }
            Alert("Vehicle Not Found", AlertType.warning);
            return(RedirectToAction(nameof(Index)));
        }