예제 #1
0
 public DbModel Build()
 {
     // create model
     _dbModel = new DbModel(_entityModel.App, _dbModelConfig);
     _driver.OnDbModelConstructing(_dbModel);
     BuildTables();
     CreateTableKeys();
     //ref constraints are created in a separate loop, after creating PKs
     BuildRefConstraints();
     FinalizeObjectNames();
     CompleteTablesSetup();
     CompileViews();
     BuildSequences();
     _driver.OnDbModelConstructed(_dbModel);
     CheckErrors();
     return(_dbModel);
 }//method
예제 #2
0
 public DbModel Build()
 {
     // create model
     _dbModel      = new DbModel(_entityModel.App, _config);
     _dbSqlBuilder = _driver.CreateDbSqlBuilder(_dbModel);
     _driver.OnDbModelConstructing(_dbModel);
     BuildTables();
     CreateTableKeys();
     SetupOrderBy();
     //ref constraints are created in a separate loop, after creating PKs
     BuildRefConstraints();
     CheckObjectNames();
     CompileViews();
     BuildCrudCommands();
     BuildSequences();
     _driver.OnDbModelConstructed(_dbModel);
     CheckErrors();
     return(_dbModel);
 }//method