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

            connection.Open();

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

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

            return(connection);
        }
 public EntityFrameworkCoreMyAbpAppDbSchemaMigrator(MyAbpAppMigrationsDbContext dbContext)
 {
     _dbContext = dbContext;
 }