Esempio n. 1
0
        // 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));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public async Task <CinemaViewModel> Get(Guid id)
        {
            var item = await CinemaQueryEntry.FindAsync(id);

            var result = item.Map <CinemaViewModel>();

            return(result);
        }
Esempio n. 4
0
        public async Task <IEnumerable <CinemaViewModel> > GetSearch([FromQuery] CinemaQueryParameter param = null)
        {
            var list = await CinemaQueryEntry.SelectAsync(param);

            var result = list.Map <List <CinemaViewModel> >();

            return(result);
        }
Esempio n. 5
0
        // GET: Cinema/Edit/5
        public async Task <IActionResult> Edit(Guid id)
        {
            var item = await CinemaQueryEntry.FindAsync(id);

            return(View(item));
        }