.NET Persistence API
From Wikipedia, the free encyclopedia
The main purposes of the .NET Persistence API (NPA) are:
- To provide a vendor-free persistence API for .NET, making switching from one persistence provider to another easier (avoiding vendor lock-in).
- To provide a cross-language persistence API by extending the popular Java Persistence API (JPA) to all the .NET programming languages.
- Object-oriented API for working against databases (usually RDBMS).
- Query language, based on SQL, for retrieving data from the database in an object oriented manner.
- Support of persisting POCO (plain old CLR objects) objects (entities).
- Two methods for marking classes as entity classes and for specifying other settings:
- Using attributes - meta data is embedded in class definitions in the source code.
- Using external XML - meta data is specified in external XML resource files.
NPA is a persistence specification. To use NPA an implementation of the specification is required. Persistence and ORM vendors can provide their own implementations of NPA.