Example #1
0
        public async Task <IActionResult> Index()
        {
            ViewBag.Title = "电影院列表";
            var cinema = await _cinemaService.GetAllAsync();

            return(View(cinema));
        }
Example #2
0
        public async Task <ActionResult <List <CinemaDto> > > GetAll()
        {
            var cinemaList = await _cinemaService.GetAllAsync();

            var cinemaModels = _mapper.Map <List <CinemaDto> >(cinemaList);

            return(cinemaModels);
        }
Example #3
0
        public async Task <ActionResult <IEnumerable <CinemaDomainModel> > > GetAsync()
        {
            IEnumerable <CinemaDomainModel> cinemaDomainModels;

            cinemaDomainModels = await _cinemaService.GetAllAsync();

            if (cinemaDomainModels == null)
            {
                return(NotFound(Messages.CINEMA_NOT_FOUND));
            }
            return(Ok(cinemaDomainModels));
        }
Example #4
0
        public async Task <ActionResult <IEnumerable <CinemaDomainModel> > > GetAsync()
        {
            IEnumerable <CinemaDomainModel> cinemaDomainModels;

            cinemaDomainModels = await _cinemaService.GetAllAsync();

            if (cinemaDomainModels == null)
            {
                cinemaDomainModels = new List <CinemaDomainModel>();
            }

            return(Ok(cinemaDomainModels));
        }
Example #5
0
 //获取全部电影院信息
 public async Task <IActionResult> Index()
 {
     //标题
     ViewBag.Title = "电影院列表";
     return(View(await _cinemaService.GetAllAsync()));
 }
 public async Task <IActionResult> Index()
 {
     ViewBag.title = "电影院列表";
     return(View(await cinemaServices.GetAllAsync()));
 }
Example #7
0
        public async Task <IActionResult> GetAll()
        {
            var result = await _cinemaService.GetAllAsync();

            return(Json(result));
        }
Example #8
0
 public async Task <IActionResult> Index()
 {
     ViewBag.Title = "电影院列表";
     // 在 View() 是 Controller 父类中定义的方法
     return(View(await _cinemaService.GetAllAsync()));
 }