public static void CreateIfNotExists() { // Creates the database if it does not yet exist. using (var db = new DownloadDataContext()) { if (db.DatabaseExists() == false) { db.CreateDatabase(); } } }