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

            connection.Open();

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

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

            return(connection);
        }
Example #2
0
 public EntityFrameworkCoreAbpStudyDbSchemaMigrator(AbpStudyMigrationsDbContext dbContext)
 {
     _dbContext = dbContext;
 }