public static void PopulateDatabaseIfNecessary() { if (!IsDatabasePopulated()) { using (SalesDataContext dataContext = new SalesDataContext()) dataContext.PopulateDatabase(); } }
public static bool IsDatabasePopulated() { using (SalesDataContext dataContext = new SalesDataContext()) return(dataContext.IsDatabaseTablesPopulated()); }