예제 #1
0
 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);
     }
 }
예제 #2
0
 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;
     }
 }