Select the tables and views to map

Topic updated 26-4-2007

Create a new BO-Layer project ArrowLeft

ArrowRight Build the BO-Layer

After creating a new BO-Layer project, the tables and views to be mapped must be selected. A BO-Layer project based on the NHibernate Templates generates a layer of business objects mapped to tables and views in the database.

method1
Click on the Execute link in the Action balloon that appears.

main_buidfirstapp-18

 

method 2
The entity selection action will also be available from the Actions Pane when the Action Balloon has been closed or has disappeared by itself. Double click the action to activate it.

main_buidfirstapp-19

 

method 3 (advanced)
Both method 1 and method 2 are in effect the same as clicking the Select Tables button on the General tab of the BO-Layer options page. This page can be opened by double clicking the BO_Layer item in the Project Explorer. Using the Select Tables button you can review or change the selection of tables later on.

main_buidfirstapp-20

 

All three methods described above open the Select Tables & Views window. This allows you to select database entities that will be mapped to business objects in your BO-Layer project.

main_buidfirstapp-21

 

You can apply automatic selections using the Select menu.

main_buidfirstapp-22

 

When you're done making your selection of tables and views click the OK button.

main_buidfirstapp-23

 

GenWise now adds business objects for all selected tables and views to your BO-Layer. The Project Explorer shows all these items.

main_buidfirstapp-24

Notice that most items appear in dark red. This means that they haven't been generated yet. Items will also appear in dark red if they have been changed, and the generated source code that belongs to the item needs regeneration.