protected override void OnModelCreating(DbModelBuilder modelBuilder) { var model = modelBuilder.Build(Database.Connection); IDatabaseCreator sqliteDatabaseCreator = new SqliteDatabaseCreator(); sqliteDatabaseCreator.Create(Database, model); }
public TestDbContext(DbConnection connection) : base(connection, true) { if (_modelBuilder == null) { return; } var model = _modelBuilder.Build(Database.Connection); var sqliteDatabaseCreator = new SqliteDatabaseCreator(); sqliteDatabaseCreator.Create(Database, model); }