Ejemplo n.º 1
0
        public ActionResult AllLots()
        {
            LotService           ls         = new LotService();
            IEnumerable <LotDTO> allLotsDTO = ls.AllLotsFromDB();

            var config  = new MapperConfiguration(cfg => cfg.CreateMap <LotDTO, LotViewModel>());
            var mapper  = new Mapper(config);
            var allLots = mapper.Map <IEnumerable <LotViewModel> >(ls.AllLotsFromDB());

            return(View(allLots));
        }