コード例 #1
0
 public static void PopulateDatabaseIfNecessary()
 {
     if (!IsDatabasePopulated())
     {
         using (SalesDataContext dataContext = new SalesDataContext())
             dataContext.PopulateDatabase();
     }
 }
コード例 #2
0
 public static bool IsDatabasePopulated()
 {
     using (SalesDataContext dataContext = new SalesDataContext())
         return(dataContext.IsDatabaseTablesPopulated());
 }