Beispiel #1
0
        public async Task <SiteFolder> GetSiteFolder(string folderName)
        {
            using (DbDataReader reader = await dbSiteFolder.GetOne(folderName))
            {
                if (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    return(siteFolder);
                }
            }

            return(null);
        }
        public async Task <ISiteFolder> GetSiteFolder(string folderName, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbSiteFolder.GetOne(folderName))
            {
                if (reader.Read())
                {
                    SiteFolder siteFolder = new SiteFolder();
                    siteFolder.LoadFromReader(reader);
                    return(siteFolder);
                }
            }

            return(null);
        }