The .NET Persistence API, also referred to as NPA, is a persistence and
object-relational mapping (ORM) specification for the
.NET framework.
NPA is based on the
Java Persistence API
Jakarta Persistence (JPA; formerly Java Persistence API) is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.
Persistence in this context covers three ...
(JPA), which is the standard persistence API in the
Java world. NPA follows JPA by providing a complete persistence API and a rich set of ORM features.
Motivation
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
In economics, vendor lock-in, also known as proprietary lock-in or customer lock-in, makes a customer dependent on a vendor for products, unable to use another vendor without substantial switching costs.
The use of open standards and alternative ...
).
* To provide a cross-language persistence API by extending the popular
Java Persistence API (JPA) to all the .NET programming languages.
Technology
The main features of NPA include:
* 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.
Implementations
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.
First implementation, NPA for
NHibernate
NHibernate is an object–relational mapping (ORM) solution for the Microsoft .NET platform. It provides a framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from ...
, was released in December 2011.
What is the equivalent of Java Persistence API for .NET? - AnandTech Forums
/ref>
References
External links
*
{{DEFAULTSORT:NET Persistence API
.NET
Object-relational mapping
Cross-platform software