public ActionResult Index() { IEnumerable <HallDomainModel> hallDomainModel = _hallService.Read(); IEnumerable <HallViewModel> hallViewModel = (Mapper.Map <IEnumerable <HallDomainModel>, IEnumerable <HallViewModel> >(hallDomainModel)).ToList(); return(View(hallViewModel)); }
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); }