The Enhancer Configuration Dialog

Using the NDO Configuration button  in the NDO toolbar, the NDO configuration dialog field is opened:

Picture 1: The NDO Configuration Dialog

Please note: If the option Generate new mapping file is selected, the enhancer recreates the file from scratch at every build, discarding any changes previously made to the file. This setting is useful in the beginning of the development phase, when the most changes in the business classes and their relations occur. You can also use this setting, if you decide to control the mapping entries in your source code using the attributes in NDO.Mapping.Attributes.

The Dialog Elements explained

Activate NDO AddIn

Activates the NDO AddIn if selected. Per default this option is unchecked. If the option is unchecked, NDO doesn't anything during the build of the given project.

Activate Enhancer

Activates the Enhancer if selected. To accelerate compilation leave this option unchecked if you are creating an assembly that uses persistent classes but does not contain persistent classes itself.

Add-in Verbose Mode

If this option is checked the enhancer produces more output which might be useful for diagnostic purposes.

Always generate a new Mapping File

If this option is checked the mapping information is completely recreated. Any hand coded table- or field names are lost. This option should not be used if you have imported the structure of an existing database using the Class Generator.

Owner / Schema Name

Enter a name, if you have to use qualified tablenames in your database like shopUser.Product. Useful for Oracle users.

Generate Time Stamp Columns for each Class

This option adds an additional column NDOTimeStamp to each table in the mapping file. The time stamps are Guids that allow recognizing collisions. The NDOTimeStamp-columns can also be created individually for each class with the help of the TimeStampColumn attribute. Please refer to the chapter Collision Detection  for details.

Generate Change Events with Add Accessor

With this option selected an event is generated in the Set-Property section if an accessor property is created. This event is needed for data binding. It signals that the object content has changed.

Generate SQL Script

If selected, a SQL script in the selected dialect is generated. This script allows creating a database which is compatible to the current mapping file.

Sql Dialect

Selects the NDO provider to produce the SQL script code.

UTF-8 Encoding

If selected, the SQL script is UTF-8 encoded. This is recommended with the most databases. If you use BuildDatabase to build the database structure, you should choose the UTF-8 encoding, since the translation from Unicode to the database specific character sets is done by the ADO.NET provider in this case.

Default Encoding

The SQL script will be encoded using the current ANSI code page.

Include Typecodes in the script

The SQL script will contain statements to create an additional table NDOTypes, containing the typecodes of polymorphic types. NDO doesn't use this information, it is only provided for the user's convenience.

Schema Version

All changes to a database structure are collected in a SQL script, which can be used to change the database without losing data. The naming convention for the script is AssemblyName.SchemaVersion.ndodiff.sql. In this edit field you can provide the SchemaVersion part of the file name. This information is also written to the mapping file. This allows to determine the currently installed version of a mapping schema and to perform an automated upgrade to the newest schema version.

Default Connection String (...)

Opens a database connection dialog. The OleDb connection dialog is used for SQL Server, Oracle and Access. But that does not mean, that NDO uses OleDb connections. NDO always uses the ADO.NET providers except in the case of Access which can only be accessed with the OleDb Jet Provider.

New

After selecting the SQL dialect a new database can be created. The connection string to the new database is entered as default connection string into the edit filed. Since the Oracle does not know the concept of databases this option is not available for Oracle databases and new schema areas must be defined in the Enterprise manager.

Preset for Library

Sets all options to default values that are most commonly used for creating an assembly with persistent classes.

Preset for Application

Sets all options to default values that are most commonly used for creating an application with persistent classes.

Save as ...

The current configuration is stored in an Xml file. This file can be used in the command line version of the enhancer (see next chapter for details). Note that NDO always creates an Xml file called VSProjectName.ndoproj.