Esempio n. 1
0
        /// <summary>
        /// Gets an IList with page of instances of GeoCountry.
        /// </summary>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="totalPages">total pages</param>
        public async Task <List <IGeoCountry> > GetCountriesPage(
            int pageNumber,
            int pageSize,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            DbDataReader reader = await dbGeoCountry.GetPage(pageNumber, pageSize, cancellationToken);

            return(LoadCountryListFromReader(reader));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets an IList with page of instances of GeoCountry.
        /// </summary>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="totalPages">total pages</param>
        public async Task <List <IGeoCountry> > GetCountriesPage(int pageNumber, int pageSize)
        {
            DbDataReader reader = await dbGeoCountry.GetPage(pageNumber, pageSize);

            return(LoadCountryListFromReader(reader));
        }