Example #1
0
        private static SqliteConnection CreateDatabaseAndGetConnection()
        {
            var connection = new SqliteConnection("Data Source=:memory:");

            connection.Open();

            var options = new DbContextOptionsBuilder <lamiMigrationsDbContext>()
                          .UseSqlite(connection)
                          .Options;

            using (var context = new lamiMigrationsDbContext(options))
            {
                context.GetService <IRelationalDatabaseCreator>().CreateTables();
            }

            return(connection);
        }
 public EntityFrameworkCorelamiDbSchemaMigrator(lamiMigrationsDbContext dbContext)
 {
     _dbContext = dbContext;
 }