What is the difference between Linq, DLinq and XLinq? [closed]
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
精彩评论