First Build and Test Cycle

Build the solution. If all things worked well, the output window of Visual Studio should look as shown at the bottom of this document. The Enhancer creates a mapping file NDOMapping.xml for each project which is visible in the Solution Explorer.

An additional file <Assemblyname>.ndo.sql is created in the bin directory of the TestApp project. This file can be used for creating database tables. The line pm.BuildDatabase() uses this file to build the database structure in the database we just created using the configuration dialog. This function is very handy for test applications. It makes sure that the database is always in a defined, empty condition.

In the executable directory you can find a schema file with the file extension .ndo.xsd. In our sample the file is called TravelAccount.ndo.xsd (if TravelAccount is the name you chose for your test app). NDO does not use this file, it is for your convenience to manipulate the data stored in the database using ADO.NET DataSets.

Important: The .ndo.sql script deletes existing tables and recreates them. Use the .ndodiff.sql script files to change existing databases.

After a change to the persistent classes, an additional file <Assemblyname>.<Schema Version>.ndodiff.sql is created by NDO to allow changing the database structure without losing existing data. The <Schema Version> part of the file name will be taken from the NDO configuration. This value can be changed in the NDO configuration dialog.

Starting the application

Nothing exciting happens on the screen if you execute the application. But if you take a look in the sample database you will note that there is a new table, named Employee, with a single entry. The entry reflects our saved object:

 

The next step following the compiler output section shows how to load the object from the database.

The compiler output generated by the sample Project:

1>------ Build started: Project: BusinessClasses, Configuration: Debug Any CPU ------
1>  BusinessClasses -> c:\Projekte\TravelAccount\BusinessClasses\bin\Debug\BusinessClasses.dll ... 1>  9 Datei(en) kopiert
1>  Enhancer executable: c:\Projekte\TravelAccount\packages\ndo.dll.3.0.0.9\build\NDOEnhancer.exe
1>  NDO Enhancer 12/05/2016 (V. 3.0.0.7 r. 855bd08)
1>  Generating class mapping for class 'BusinessClasses.Employee'
1>  Generating field mapping: BusinessClasses.Employee.firstName -> FirstName
1>  Generating field mapping: BusinessClasses.Employee.lastName -> LastName
1>  Enhancing Assembly
1>  Enhancer ready
1> 
NDO Extension 03/29/2016 (V. 3.0.0.5 r. 86c0872)
2>------ Build started: Project: TravelAccount, Configuration: Debug Any CPU ------
2>  TravelAccount -> c:\Projekte\TravelAccount\TravelAccount\bin\Debug\TravelAccount.exe ... 2>  9 Datei(en) kopiert
2>  Enhancer executable: c:\Projekte\TravelAccount\packages\ndo.dll.3.0.0.9\build\NDOEnhancer.exe
2>  NDO Enhancer 12/05/2016 (V. 3.0.0.7 r. 855bd08)
2> 
NDO Extension 03/29/2016 (V. 3.0.0.5 r. 86c0872)
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========