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); }
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); }