Database Schema Validation

The first time you connect to a database ORM.NET will attempt to validate the database in order to ensure that a complete object model can be generated and that the resulting class files will compile as a .NET Assembly.

 

If any problems are detected two window panes are displayed.

 

 

For example, when first loading the default Pubs database included with SQL Server 2000 the following list of problems are displayed.

 

 

 

 

There were no invalid table or column names, however , two of the tables - Discounts and Roysched do not have a primary key defined.

 

You can choose to fix these problems by adding one or more primary keys to each of the tables. Once you have added the primary keys clicking Get DB Schema Changes or reconnecting to the database will update the ORM.NET Object Browser to include these tables within the generated Data Layer.

 

You can also choose not to fix these tables in which case those tables and any relations defined between them will not be included in the generated Data Layer. This may make sense if you have test tables or logs which you do not want to include within your Data Layer.