实体框架VS LINQ到实体VS LINQ到SQL [英] Entity Framework vs Linq to Entities vs Linq to SQL

查看:199
本文介绍了实体框架VS LINQ到实体VS LINQ到SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了很多篇关于如何与数据库一道, WPF .NET 4.0 应用程序。我的理解,主要的两种技术分别是:

I read a lot of articles about how to work with a database in WPF .Net 4 application. As I understood, the main two technologies are:

  • LINQ到SQL(L2S)
  • 在实体框架(EF)

但有时我也能看到一提的LINQ到实体(L2E)技术,但无法找到明确的解释有什么区别EF和L2E之间。

but sometimes I also can see mention of Linq to Entities (L2E) technology, but can't find clear explanation what difference between EF and L2E.

所以,我的问题是:是否有到实体的技术实体框架和LINQ之间有什么区别?或者,这是同义词一种技术?

So, my question is: Does there is any difference between Entity Framework and Linq to Entities technologies? Or this is synonyms for one technology?

感谢。

推荐答案

有与实体框架编写查询的方式有两种:

There are two ways of writing queries with Entity Framework:

  • LINQ到实体(<一href="http://msdn.microsoft.com/en-us/library/bb386964.aspx">http://msdn.microsoft.com/en-us/library/bb386964.aspx )
  • 在实体SQL(<一href="http://msdn.microsoft.com/en-us/library/bb387145.aspx">http://msdn.microsoft.com/en-us/library/bb387145.aspx )
  • Linq to Entities ( http://msdn.microsoft.com/en-us/library/bb386964.aspx )
  • Entity SQL ( http://msdn.microsoft.com/en-us/library/bb387145.aspx )

L2E不是一个单独的技术,而是EF的一部分。

L2E is not a separate technology, but rather a part of EF.

有一个在这篇文章的比较: <一href="http://thedatafarm.com/blog/data-access/choosing-linq-to-entities-vs-entity-sql-vs-entityclient/">http://thedatafarm.com/blog/data-access/choosing-linq-to-entities-vs-entity-sql-vs-entityclient/

Have a look at this article for a comparison: http://thedatafarm.com/blog/data-access/choosing-linq-to-entities-vs-entity-sql-vs-entityclient/

这篇关于实体框架VS LINQ到实体VS LINQ到SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆