コード例 #1
0
ファイル: SiteRepository.cs プロジェクト: fazueu/cloudscribe
        public async Task <List <SiteFolder> > GetPageSiteFolders(
            int pageNumber,
            int pageSize)
        {
            List <SiteFolder> siteFolderList
                = new List <SiteFolder>();

            using (DbDataReader reader = await dbSiteFolder.GetPage(pageNumber, pageSize))
            {
                while (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    siteFolderList.Add(siteFolder);
                }
            }

            return(siteFolderList);
        }
コード例 #2
0
        public async Task <List <ISiteFolder> > GetPageSiteFolders(
            int pageNumber,
            int pageSize,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            List <ISiteFolder> siteFolderList
                = new List <ISiteFolder>();

            using (DbDataReader reader = await dbSiteFolder.GetPage(pageNumber, pageSize))
            {
                while (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    siteFolderList.Add(siteFolder);
                }
            }

            return(siteFolderList);
        }