.NET Persistence API

The .NET Persistence API, also referred to as NPA, is a persistence and object–relational mapping (ORM) specification for the .NET framework.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

The .NET Persistence API, also referred to as NPA, is a persistence and object–relational mapping (ORM) specification for the .NET framework.[1]

NPA is based on the Java Persistence API (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.[2][3]

Motivation

edit edit source

The main purposes of the .NET Persistence API (NPA) are:[2]

  • 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.

Technology

edit edit source

The main features of NPA include:[4][5]

  • 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

edit edit source

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, was released in December 2011.[6][7]

References

edit edit source
  1. ^ NPersistence | JPA for the .NET platform Wikipedia revision 1369054581, retrieved 2026-11-18
  2. ^ a b "FAQ | NPersistence". Archived from the original on 2012-04-26. Retrieved 2018-08-24. Wikipedia revision 1369054581, retrieved 2026-11-18
  3. ^ c# – What is the equivalent of JPA in .NET? – Stack Overflow Wikipedia revision 1369054581, retrieved 2026-11-18
  4. ^ "API Reference". Archived from the original on 2012-04-26. Retrieved 2018-08-24. Wikipedia revision 1369054581, retrieved 2026-11-18
  5. ^ NPersistence – NuGet Must Haves Wikipedia revision 1369054581, retrieved 2026-11-18
  6. ^ "NPA for NHibernate". Archived from the original on 2012-04-26. Retrieved 2011-12-30. Wikipedia revision 1369054581, retrieved 2026-11-18
  7. ^ What is the equivalent of Java Persistence API for .NET? – AnandTech Forums[link removed] Wikipedia revision 1369054581, retrieved 2026-11-18
edit edit source Wikibooks has a book on the topic of: .NET Development Foundation .NET Implementations Architecture Components Tools IDEs Organizations

Text derived from https://en.wikipedia.org/w/index.php?oldid=1369054581 under CC BY-SA 4.0; modifications have been made.