public void OnActivityCreated(Activity activity, Bundle savedInstanceState) { if (!CopyCompleted) { DatabaseHelper DbHelper = new DatabaseHelper(); DatabaseInitHelper.CopyDatabase(DbHelper.GetFullDbPath()); DatabaseInitHelper.CopyDatabaseMigrationFiles(DbHelper.GetMigrationScriptBaseFolderPath()); Database.DatabaseMigrator.Migrate(DbHelper.GetConnection(), DbHelper.GetMigrationScriptBaseFolderPath()); #if DEBUG DatabaseInitHelper.CopyDatabaseToSDCard(); #endif CopyCompleted = true; } }
public DataBaseController(FastFoodContext ffContext) { dbInitHelper = new DatabaseInitHelper(ffContext); }