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

            connection.Open();

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

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

            return(connection);
        }
Exemple #2
0
 public EntityFrameworkCoreAbpIoSqliteSampleDbSchemaMigrator(AbpIoSqliteSampleMigrationsDbContext dbContext)
 {
     _dbContext = dbContext;
 }