请输入您要查询的百科知识:

 

词条 .NET Persistence API
释义

  1. Motivation

  2. Technology

  3. Implementations

  4. References

  5. External links

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

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

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

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

1. ^NPersistence | JPA for the .NET platform
2. ^{{Cite web |url=http://www.npersistence.org/faq |title=FAQ {{!}} NPersistence |access-date=2018-08-24 |archive-url=https://web.archive.org/web/20120426082101/http://www.npersistence.org/faq |archive-date=2012-04-26 |dead-url=yes |df= }}
3. ^[https://stackoverflow.com/questions/2756307/what-is-the-equivalent-of-jpa-in-net c# - What is the equivalent of JPA in .NET? - Stack Overflow]
4. ^{{Cite web |url=http://www.npersistence.org/api-reference |title=API Reference |access-date=2018-08-24 |archive-url=https://web.archive.org/web/20120426082146/http://www.npersistence.org/api-reference |archive-date=2012-04-26 |dead-url=yes |df= }}
5. ^NPersistence - NuGet Must Haves
6. ^{{Cite web |url=http://www.npersistence.org/nhibernate |title=NPA for NHibernate |access-date=2011-12-30 |archive-url=https://web.archive.org/web/20120426082225/http://www.npersistence.org/nhibernate |archive-date=2012-04-26 |dead-url=yes |df= }}
7. ^[https://archive.today/20130928184005/http://forums.anandtech.com/archive/index.php/t-2108535.html What is the equivalent of Java Persistence API for .NET? - AnandTech Forums]

External links

  • {{Official website|www.npersistence.org}}
{{DEFAULTSORT:NET Persistence API}}{{Portal bar|.NET Framework}}

3 : .NET Framework|Object-relational mapping|Cross-platform software

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/14 5:02:41