Example #1
0
        public ActionResult Details(int id)
        {
            VehiclesManager manager = new VehiclesManager();
            var             item    = manager.Get(id);

            return(View(model: item));
        }
Example #2
0
        public ActionResult Delete(int id)
        {
            VehiclesManager manager = new VehiclesManager();
            var             item    = manager.Get(id);

            manager.Remove(item);
            return(View("Index"));
        }
Example #3
0
        public ActionResult Edit(Vehicle vehicle)
        {
            VehiclesManager manager = new VehiclesManager();

            manager.Update(vehicle);
            var item = manager.Get(vehicle.Id);

            return(View(viewName: "Details", model: item));
        }