// GET: Cinema public async Task <IActionResult> Index(CinemaQueryParameter param = null, int pageIndex = 1, int pageSize = 10) { var paged = await CinemaQueryEntry.PagedAsync(param, pageIndex, pageSize); var result = paged.MapPaged <CinemaViewModel>(); return(View(result)); }
public async Task <IPaged <CinemaViewModel> > Get([FromQuery] CinemaQueryParameter param = null, int pageIndex = 1, int pageSize = 10) { var paged = await CinemaQueryEntry.PagedAsync(param, pageIndex, pageSize); var result = paged.MapPaged <CinemaViewModel>(); return(result); }
public async Task <CinemaViewModel> Get(Guid id) { var item = await CinemaQueryEntry.FindAsync(id); var result = item.Map <CinemaViewModel>(); return(result); }
public async Task <IEnumerable <CinemaViewModel> > GetSearch([FromQuery] CinemaQueryParameter param = null) { var list = await CinemaQueryEntry.SelectAsync(param); var result = list.Map <List <CinemaViewModel> >(); return(result); }
// GET: Cinema/Edit/5 public async Task <IActionResult> Edit(Guid id) { var item = await CinemaQueryEntry.FindAsync(id); return(View(item)); }