protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        var model = modelBuilder.Build(Database.Connection);
        IDatabaseCreator sqliteDatabaseCreator = new SqliteDatabaseCreator();

        sqliteDatabaseCreator.Create(Database, model);
    }
예제 #2
0
        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);
        }