Wednesday, May 23, 2018

What is NDO? » NDO for Developers

Register  Login


 NDO for Developers  

NDO® (.NET Data Objects®) is a powerful tool for object relational mapping (O/R-Mapping) on the Microsoft® .NET Platform.

NDO is based completely on ADO.NET and complies to the .NET standard in all aspects. NDO makes ordinary .NET classes work as persistent classes so that instances are stored in relational databases like SQL Server®, Oracle®, MySql®, Access®, Firebird® or PostgreSql®.
- It is sufficient to mark classes with the attribute [NDOPersistent].
- There is no need to derive persistent classes from framework classes.
- The inheritance hierarchy remains reserved for the implementation of your domain model.

Assembly Enhancer

Persistent classes must cooperate with the persistence framework for seamless access to the database, for example to notifiy the framework about changes in an object. NDO employs  what's known as an Assembly Enhancer, which generates code into your assembly after compiling. The Enhancer can work while integrated in Visual Studio and in automated builds with NMake or Microsoft Build.


Automatic access detection allows NDO to load object data on demand or mark objects for saving. NDO also detects changes in object relationships and ensures the changes are reflected in the database.

Lazy Loading (On-Demand Loading)

NDO automatically loads child objects in relations if the child object container is accessed. Optionally you can specify that child objects in a certain relation should be loaded immediately at query time.

Database structure

O/R Mapping only makes sense if your data can be analyzed independently from the application which produces the data. The database structures generated by NDO are as near as possible to database structures you would code by hand.

Reverse Mapping

The NDO Professional and Enterprise Editions provide a tool which helps translate the existing databases into a class system, provided the database structure meets a small set of requirements. [Note: The class generator is currently in beta state.]

The NDO Provider Concept

NDO is based completely on ADO.NET. Thus it works with any database having a well developed ADO.NET provider. Between the NDO and ADO.NET provider is a small software layer called the NDO Provider. In less than a few hours you can write your own NDO Provider. The Provider can also be extended to generate SQL scripts that will create your database tables. NDO ships with the NDO Provider source code for the MySql®, Firebird® and PostgreSql® databases. You can use this source as a base for your own NDO Provider.

® The mentioned product names are property of their respective owners.