Beispiel #1
0
        public virtual ActionResult Index()
        {
            var sections    = _genericRepository.GetAll <Section>().ToList();
            var indexModels = new List <IndexModel>();

            foreach (var section in sections)
            {
                var indexModel = new IndexModel();
                _sectionToIndexModelMapper.Map(section, indexModel);
                indexModels.Add(indexModel);
            }

            return(View(indexModels));
        }
        public virtual ActionResult Index()
        {
            var sections = _genericRepository.GetAll<Section>().ToList();
            var indexModels = new List<IndexModel>();

            foreach (var section in sections)
            {
                var indexModel = new IndexModel();
                _sectionToIndexModelMapper.Map(section, indexModel);
                indexModels.Add(indexModel);
            }

            return View(indexModels);
        }