Exemplo n.º 1
0
        /// <summary>
        /// Request Data And Save them To Cache
        /// </summary>
        /// <param name="page">page number in remote repository</param>
        /// <returns>List of movie data items</returns>
        private async Task <List <IMovieItem> > RequestDataAndSaveToCache(int page)
        {
            var newItems = await _remoteDataService.GetItemsAtAsync(page);

            await _cacheService.InsertOrReplaceItemsAsync(newItems);

            return(newItems);
        }