Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQ on the .NET 2.0 Runtime

Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed?

In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0.

How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?

like image 680
urini Avatar asked Aug 05 '08 12:08

urini


People also ask

Can we use LINQ in asp net?

You can use Language-Integrated Query (LINQ) in Web pages to retrieve and modify data. LINQ applies the principles of object-oriented programming to relational data.

Does .NET core support LINQ?

How can I use LinQ on . Net Core? LinQ seem to be supported by . Net Framework.

Is LINQ C# slow?

Conclusion. It would seem the performance of LINQ is similar to more basic constructs in C#, except for that notable case where Count was significantly slower. If performance is important it's crucial to do benchmarks on your application rather than relying on anecdotes (including this one).

Is LINQ part of .NET framework?

Language-Integrated Query (LINQ) is an innovation introduced in the . NET Framework version 3.5 that bridges the gap between the world of objects and the world of data. Traditionally, queries against data are expressed as simple strings without type checking at compile time or IntelliSense support.


1 Answers

It's weird that no one has mentioned LINQBridge. This little awesome project is a backport of LINQ (IEnumerable, but without IQueryable) and its dependencies (Func, Action, etc) to .NET 2.0. And:

If your project references LINQBridge during compilation, then it will bind to LINQBridge's query operators; if it references System.Core during compilation, then it will bind to Framework 3.5's query operators.

like image 66
Mauricio Scheffer Avatar answered Oct 14 '22 05:10

Mauricio Scheffer