static void Main(string[] args) { var connection = new SQLiteNetConnectionProvider(new SQLiteConnection("SQLiteNetdatabase.sqlite")); var versionProvider = new SQLiteNetVersionProvider(); var migrator = new SimpleMigrator<SQLiteConnection, SQLiteNetMigration>( Assembly.GetEntryAssembly(), connection, versionProvider); var runner = new ConsoleRunner(migrator); runner.Run(args); }
static void Main(string[] args) { var migrationsAssembly = typeof(Program).Assembly; var db = new SQLiteConnection("DataSource=database.sqlite"); var versionProvider = new SQLiteVersionProvider(); var migrator = new SimpleMigrator(migrationsAssembly, db, versionProvider); var runner = new ConsoleRunner(migrator); runner.Run(args); }
static void Main(string[] args) { using (var connection = new SQLiteConnection("SQLiteNetdatabase.sqlite")) { var databaseProvider = new SQLiteNetDatabaseProvider(connection); var migrator = new SimpleMigrator<SQLiteConnection, SQLiteNetMigration>( Assembly.GetEntryAssembly(), databaseProvider); var runner = new ConsoleRunner(migrator); runner.Run(args); } }
static void Main(string[] args) { var migrationsAssembly = typeof(Program).Assembly; using (var connection = new SQLiteConnection("DataSource=database.sqlite")) { var databaseProvider = new SqliteDatabaseProvider(connection); var migrator = new SimpleMigrator(migrationsAssembly, databaseProvider); var runner = new ConsoleRunner(migrator); runner.Run(args); } }