Penguen
Penguen

Reputation: 17298

How can I use dynamic LINQ in my asp.net project?

How can I use dynamic LINQ in Visual Studio 2008?

I'm trying to use

using System.linq.Dynamic 

but there is no intellisense. How can I use it?

Upvotes: 4

Views: 2691

Answers (3)

Avien
Avien

Reputation: 1260

I was also struggling with this and this is how I got it work:

  1. Place the Dynamic.cs file in the App_Code folder of your application (not sure this is absolutely necessary but I'd it anyway)
  2. Once there right click this file (Dynamic.cs) in your solution explorer and in it's properties window change the build action to COMPILE! (this is crucial)
  3. Now you need to add using System.Linq.Dynamic; where you intend to use it

thanks to this guy

Upvotes: 0

E.J. Brennan
E.J. Brennan

Reputation: 46879

You should find the answer in here:

How do I build up LINQ dynamically

Upvotes: 0

Marc Gravell
Marc Gravell

Reputation: 1064114

Well, I'll first say that dynamic LINQ is usually overkill, but sometimes useful. But you should just be able to reference the dll and away you go. If no intellisense is appearing, but it compiles, then check where (physically) the dynamic linq dll is located. Ensure the "foo.dll.xml" file is located next to "foo.dll" (where "foo" is the assembly - perhaps System.Linq.Dynamic ?). This is key for intellisense when using assembly references.

Upvotes: 3

Related Questions