Beispiel #1
0
        public async Task <ISiteHost> GetSiteHost(string hostName)
        {
            using (DbDataReader reader = dbSiteSettings.GetHost(hostName))
            {
                while (reader.Read())
                {
                    SiteHost host = new SiteHost();
                    host.LoadFromReader(reader);
                    return(host);
                }
            }

            return(null);
        }
Beispiel #2
0
        public async Task <ISiteHost> GetSiteHost(string hostName, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = dbSiteSettings.GetHost(hostName))
            {
                while (reader.Read())
                {
                    SiteHost host = new SiteHost();
                    host.LoadFromReader(reader);
                    return(host);
                }
            }

            return(null);
        }