Esempio n. 1
0
        public async Task <IActionResult> GetWatchedFilms(int page = 1, int pageSize = 5)
        {
            var count = await _filmReader.GetWatchedFilmCount(_currentUserAccessor.CurrentUser.Id);

            var records = await _filmReader.GetWatched(_currentUserAccessor.CurrentUser.Id, pageSize, (page - 1) *pageSize);

            return(Ok(PagedResponse <FilmResponse> .FromEnumerable(records, record => FilmResponse.FromRecord(record), page, pageSize, count)));
        }