public static void Initialize(string fileOrConnection) { using (VoiceMemosContext dbContext = new VoiceMemosContext(fileOrConnection)) { if (dbContext.DatabaseExists() == false) { // Create the local database. dbContext.CreateDatabase(); // Seed data. Seed(dbContext); // Save changes to database dbContext.SubmitChanges(); // Set the database version. SchemaMigrator.SetSchemaVersion(dbContext); } else { SchemaMigrator.ApplyMigrations(dbContext); } } }
private static void Seed(VoiceMemosContext context) { // TODO: Add data seed logic if needed. }