NPersistence - .NET Persistence API

FAQ

You are here

About NPersistence


What is NPersistence?

NPersistence (NPA) is a standard API for accessing databases from within .NET C# applications.

The main advantage of NPersistence over ODBC (the older .NET API for interacting with databases) is that in NPersistence, data is represented by classes and objects rather than by tables and records as in ODBC.

Using plain old CLR objects (POCO) to represent persistent data can significantly simplify database programming.

An NPersistence implementation (the NPA provider) is needed in order to interact with a database such as Oracle, DB2, SQL Server or MySQL which are relational databases.

Object Relational Mapping (ORM) tools map the bridges between the data representation in the relational database (as tables and records) and the representation in the .NET application (as classes and objects).

What is ORM?

ORM stands for Object Relational Mapping. Most databases are relational and use tables and records while applications are object oriented and use classes and object. 

ORM providers are middleware layer applications that can dynamically map classes to relational databases given a description of the classes (entities) and relationships between them.

These applications dynamically generate SQL for loading and storing the described objects

What is the difference between NPersistence and NHibernate?

NHibernate is an ORM provider application and NPersistence is a set of APIs that standardize ORM throughout the industry.

NHibernate and other ORM providers implement the NPersistence API.

 

Using NPersistence


Why use NPersistence?

If an application uses NPersistence, it is implementation independent.

The application calls the NPersistence APIs for it's ORM operations and can change the vendors which implement NPersistence with zero changes in the application code itself.

Which ORM providers support NPersistence?

Currently only NHibernate implements NPersistence, you can find the implementation in this site's download page.

Other implementations for NHibernate are in development and will be available soon.

What are the system requirements for using NPersistence?

The NPersistence layer itself only requires .Net 4.0 platform.

Since using NPersistence also requires an ORM vendor, the vendor's requirements should be met as well.

 

Getting started


How to install NPersistence?

NPersistence is a dll file that is added to your application.

Download the NPersistence zip file at this website's download page, extract it and copy the 'NPersistence.dll' file to your application's development location.

Is there a tutorial for NPersistence?

Yes, this website has a tutorial for using NPersistence with NHibernate.

In addition, a full API documentation is available on this site.