public async Task <IActionResult> Index() { ViewBag.Title = "电影院列表"; var cinema = await _cinemaService.GetAllAsync(); return(View(cinema)); }
public async Task <ActionResult <List <CinemaDto> > > GetAll() { var cinemaList = await _cinemaService.GetAllAsync(); var cinemaModels = _mapper.Map <List <CinemaDto> >(cinemaList); return(cinemaModels); }
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)); }
public async Task <ActionResult <IEnumerable <CinemaDomainModel> > > GetAsync() { IEnumerable <CinemaDomainModel> cinemaDomainModels; cinemaDomainModels = await _cinemaService.GetAllAsync(); if (cinemaDomainModels == null) { cinemaDomainModels = new List <CinemaDomainModel>(); } return(Ok(cinemaDomainModels)); }
//获取全部电影院信息 public async Task <IActionResult> Index() { //标题 ViewBag.Title = "电影院列表"; return(View(await _cinemaService.GetAllAsync())); }
public async Task <IActionResult> Index() { ViewBag.title = "电影院列表"; return(View(await cinemaServices.GetAllAsync())); }
public async Task <IActionResult> GetAll() { var result = await _cinemaService.GetAllAsync(); return(Json(result)); }
public async Task <IActionResult> Index() { ViewBag.Title = "电影院列表"; // 在 View() 是 Controller 父类中定义的方法 return(View(await _cinemaService.GetAllAsync())); }