예제 #1
0
        public ActionResult Index()
        {
            IEnumerable <HallDomainModel> hallDomainModel = _hallService.Read();
            IEnumerable <HallViewModel>   hallViewModel   =
                (Mapper.Map <IEnumerable <HallDomainModel>, IEnumerable <HallViewModel> >(hallDomainModel)).ToList();

            return(View(hallViewModel));
        }
예제 #2
0
        private IEnumerable <SelectListItem> GetHallsCinemas()
        {
            IEnumerable <SelectListItem> hallsCinemas = _hallService
                                                        .Read()
                                                        .Select(x => new SelectListItem()
            {
                Value = x.Id.ToString(),
                Text  = x.Cinema.Name + " " + x.Name
            });

            return(hallsCinemas);
        }