Exemple #1
0
        public async Task <List <SiteFolder> > GetSiteFoldersBySite(Guid siteGuid)
        {
            List <SiteFolder> siteFolderList
                = new List <SiteFolder>();

            using (DbDataReader reader = await dbSiteFolder.GetBySite(siteGuid))
            {
                while (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    siteFolderList.Add(siteFolder);
                }
            }

            return(siteFolderList);
        }
        public async Task <List <ISiteFolder> > GetSiteFoldersBySite(Guid siteGuid, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            List <ISiteFolder> siteFolderList
                = new List <ISiteFolder>();

            using (DbDataReader reader = await dbSiteFolder.GetBySite(siteGuid))
            {
                while (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    siteFolderList.Add(siteFolder);
                }
            }

            return(siteFolderList);
        }