Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 671285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:21:24+00:00 2026-05-14T00:21:24+00:00

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

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:21:25+00:00Added an answer on May 14, 2026 at 12:21 am

    The difference between IQueryable and IQueryable<T> is that the second is typed while the first is not. To convert IQueryable into IQueryable<T> you can use the Cast<T>() method.

    IQueryable myQueryable = ...;
    IQueryable<MyType> myTypedQueryable = myQueryable.Cast<myQueryable>();
    IList<MyType> myList = myTypedQueryable.ToList();
    

    Obviously the contents of myQyeryable must be castable into MyType. To select the instances of a certain type you can use the TypeOf<T>() method before doing the cast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried some ways to use LINQ dynamic queries - LINQKit and LINQ
I am using the Dynamic Linq library found here: http://speakingin.net/2008/01/08/dynamic-linqparte-1-usando-la-libreria-de-linq-dynamic/ http://msdn.microsoft.com/en-us/vstudio//bb894665.aspx I have the
I have been trying to use dynamic LINQ to Entity in my application for
I have built a simple StreamGeometry, using MSDN example: StreamGeometry geometry = new StreamGeometry();
I tried using http://msdn.microsoft.com/en-us/library/system.windows.forms.application.threadexception.aspx#Y399 but when I do this throw new ArgumentNullException(playlist is empty);
I am using ASP.NET Dynamic Data for a project and I have a table
I have a dynamic form where rows are added and removed using JavaScript. From
I know I can impersonate a windows account using: http://msdn.microsoft.com/en-us/library/chf6fbt4.aspx But how do I
I'm using DiInstallDevice function ( MSDN ) for driver installing. However, I've got a
The MSDN says that using ReadDirectoryChangesW implies the calling process having the Backup and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.