开发者

What is the difference between Linq, DLinq and XLinq? [closed]

开发者 https://www.devze.com 2023-03-17 14:33 出处:网络
As it currently stands, this question is not a good fit for our Q&A f开发者_高级运维ormat. We expect answers to be supported by facts, references,or expertise, but this question will likely so
As it currently stands, this question is not a good fit for our Q&A f开发者_高级运维ormat. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I am reading about Linq. Please explain to me how Linq, DLinq and XLinq are different.


Linq is the base language extension which lets you query data collections using sql-like syntax. The big advantage is that it is written next to your code in the Visual Studio environment so the concepts of sql data access have been promoted to first level language constructs. This means you get all the intellisense and other cool advantages of working in VS.

So like I said, Linq is the basic technology. You can use this to query virtually anything. In plain vanilla form you can just access data like arrays

DLinq is what linq to sql was called when it was in development.

Linq to sql is a way of mapping your database to a data context and then you can use linq to access your tables in your database and make changes. It is a pretty cool technology but unfortunately it is out of date now and is being "discontinued" by Microsoft in favour of Entity Framework (which is Linq to Entities).

When I say discontinued what I mean is this: they have said they will do more features after asp.net 4.0 but they are going to put main development emphasis on Entity Framework and lots of Microsoft apps are going to be converted to use Entity Framework.

XLinq as you might have guessed by now is a way of querying Xml files with Linq.

Here is a tutorial introducing it.


Both DLinq and XLinq are just extensions for Linq:

Linq is a programming model that introduces queries 
as a first-class concept into any Microsoft .NET language

DLinq is an extension to Linq that allows querying a database 
and do object-relational mapping.

XLinq is an extension to Linq that allows querying XML documents, 
as well as creating or transforming XML.


Official MSDN link for linq where you can get anything you want.....

LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.

Where as other are flavor of the Linq you can also create you own if you want.

Dlinq is for the SQL to linq

Xlinq is for the Linq to XML

0

精彩评论

暂无评论...
验证码 换一张
取 消