Ejemplo n.º 1
0
 public ActionResult Index()
 {
     var vehicles = new Services().ListVehicles();
     var model = Mapper.Map<IEnumerable<Vehicle>, IEnumerable<VehicleViewModel>>(vehicles);
     return View(model);
 }
Ejemplo n.º 2
0
 public ActionResult Trucks()
 {
     var trucks = new Services().ListTrucks();
     var model = Mapper.Map<IEnumerable<Truck>, IEnumerable<TruckViewModel>>(trucks);
     return View(model);
 }
Ejemplo n.º 3
0
 public ActionResult Cars()
 {
     var cars = new Services().ListCars();
     var model = Mapper.Map<IEnumerable<Car>, IEnumerable<CarViewModel>>(cars);
     return View(model);
 }