Ejemplo n.º 1
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