.NET数据访问数据、NET

2023-09-04 06:23:05 作者:轻雨素纱月初凉

什么是学习.NET数据访问的最佳方法是什么?实体框架似乎是新的它的事情,但我有什么其他选择?

What is the best way to learn data access in .net? The Entity Framework seems to be the new "it" thing, but what other options do I have?

谢谢

罗伯特·

推荐答案

您起点的的 ADO.NET ,与现有的文件点击:http://msdn.microsoft.com/en-us/library/e80y5yhx(V = VS.80)的.aspx

Your starting point is ADO.NET, with documentation available at :http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.80).aspx .

这是基于ADO.NET是 LINQ到这两个最新的Microsoft库SQL 和实体框架。它们是由Microsoft维护

The two most current Microsoft libraries that are based on ADO.NET are LINQ to SQL and the Entity Framework. They are maintained by Microsoft.

NHibernate的 是一种很常用的,强烈推荐开源ORM和持久性框架。文档和资源可以从: http://nhforge.org/

亚音速 是一个超级高保真蝙蝠侠公共传送带的作品了数据访问(在3.0使用LINQ),抛出一些急需的实用功能,并且通常沿着你的开发周期的速度。这是一个GitHub的页面的开放源码 https://github.com/subsonic/SubSonic-3.0。

有许多其他奥姆斯为好,但这些是最常用的开源关系数据库解决方案。维基百科的.NET ORM软件, HTTP一个pretty的广泛的名单:// EN .wikipedia.org /维基/ List_of_object-relational_mapping_software#.NET 。

There are many other ORMs as well, but these are the most commonly used open source relational database solutions. Wikipedia has a pretty extensive list of .NET ORM software at http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#.NET.

ADO.NET背后包含.NET Framework中的数据访问的基本对象。 LINQ to SQL的可能是最简单的ORM学习和使用,但它总是会比较容易,如果你明白发生了什么下方。实体框架是相似的LINQ to SQL,但包含更多的功能,其目的是更域驱动的方法,其中的LINQ to SQL是更大的活动记录模式的。

ADO.NET includes the fundamental objects behind Data Access in the .NET Framework. LINQ to SQL is probably the most simple ORM to learn and use, but it will always be easier if you understand what is happening underneath. The Entity Framework is similar to LINQ to SQL but includes much more functionality and aims at a more domain-driven approach, where as LINQ to SQL is more of an Active Record pattern.