Dynamic query to immediate execute?

Posted by Curtis White on Stack Overflow See other posts from Stack Overflow or by Curtis White
Published on 2010-03-12T23:03:20Z Indexed on 2010/03/12 23:07 UTC
Read the original article Hit count: 227

Filed under:
|
|

I am using the MSDN Dynamic linq to sql package. It allows using strings for queries.

But, the returned type is an IQueryable and not an IQueryable<T>. I do not have the ToList() method.

How can I this immediate execute without manually enumerating over the IQueryable?

My goal is to databind to the Selecting event on a linqtosql datasource and that throws a datacontext disposed exception. I can set the query as the Datasource on a gridview though.

Any help greatly appreciated! Thanks.

The dynamic linq to sql is the one from the samples that comes with visual studio.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about sql