private bool _TryGetTopSite() { try { bool exists = false; using (var dbContext = new DNA.Web.Data.CoreDbContext()) { exists = dbContext.Webs.Count(w => w.Name.Equals("home", StringComparison.OrdinalIgnoreCase)) > 0; } return(exists); } catch { return(false); } }
private bool _TryGetTopSite() { try { bool exists = false; using (var dbContext = new DNA.Web.Data.CoreDbContext()) { exists = dbContext.Webs.Count(w => w.Name.Equals("home", StringComparison.OrdinalIgnoreCase)) > 0; } return exists; } catch { return false; } }