是什么&QUOT之间的差异;以实体LINQ"," LINQ to SQL的"和" LINQ到数据集" [英] What is the difference between "LINQ to Entities", "LINQ to SQL" and "LINQ to Dataset"

查看:164
本文介绍了是什么&QUOT之间的差异;以实体LINQ"," LINQ to SQL的"和" LINQ到数据集"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经工作了相当长一段时间,现在使用LINQ。但是,它仍然是一个谜什么真正的区别是LINQ的口味提到之间。

I've been working for quite a while now with LINQ. However, it remains a bit of a mystery what the real differences are between the mentioned flavours of LINQ.

成功的答案将包含它们之间的区别很短。什么是每种口味的主要目标,什么是效益,有没有性能影响...

P.S。
我知道有很多信息来源在那里,但我正在寻找一个样的小抄,它指示一个新手到哪里前往一个特定的目标。

P.S. I know that there are a lot of information sources out there, but I'm looking for a kind of a "cheat sheet" which instructs a newbie where to head for a specific goal.

推荐答案


  • 所有的人都LINQ - 语言集成查询 - 所以他们都有一个共性很多的。所有这些方言基本上让你做一个查询式的选择数据,从各种来源。

  • all of them are LINQ - Language Integrated Query - so they all share a lot of commonality. All these "dialects" basically allow you to do a query-style select of data, from various sources.

    LINQ到SQL 是微软在一个ORM的第一次尝试 - 对象关系映射。它仅支持SQL Server。这是一种映射技术映射到SQL Server数据库表的.NET对象。

    Linq-to-SQL is Microsoft's first attempt at an ORM - Object-Relational Mapper. It supports SQL Server only. It's a mapping technology to map SQL Server database tables to .NET objects.

    LINQ到实体是同样的想法,但会在后台使用实体框架,作为ORM - 再从微软,但支持多种数据库后端

    Linq-to-Entities is the same idea, but using Entity Framework in the background, as the ORM - again from Microsoft, but supporting multiple database backends

    LINQ到数据集是LINQ,但使用是违反旧式ADO .NET 2.0数据集 - 在时代之前,ORM的来自微软,你可以使用ADO.NET做返航数据集,数据表等,并LINQ到数据集查询这些数据存储数据。因此,在这种情况下,你会从后台数据库返回的DataTable或数据集(System.Data命名空间),然后查询这些使用LINQ语法

    Linq-to-DataSets is LINQ, but using is against the "old-style" ADO.NET 2.0 DataSets - in the times before ORM's from Microsoft, all you could do with ADO.NET was returning DataSets, DataTables etc., and Linq-to-DataSets queries those data stores for data. So in this case, you'd return a DataTable or DataSets (System.Data namespace) from a database backend, and then query those using the LINQ syntax

    这篇关于是什么&QUOT之间的差异;以实体LINQ"," LINQ to SQL的"和" LINQ到数据集"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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