none
ExecuteQuery crashing RRS feed

  • Question

  • I'm still trying to get actual data (not just the query) from LinqToSql with Scott Gu's DynamicLibrary. The latest thing I've tried is this:

    List<s_SecurityGroup> securityGroups =
     context.ExecuteQuery<s_SecurityGroup>("select * from s_SecurityGroup").ToList();
    

    This is just a test. In the production code, users must be able to select any of a range of columns in any order, so the dynamic queries are a must. This code, however, is causing the development server in Visual Studio 2010 to crash, never completing. Can anyone enlighten me as to why?

    Monday, November 1, 2010 3:19 PM

Answers

  • Hello,

    Please try to add

    using System.Data.Linq.Dynamic;

    in the using section of you file and then run the following:

    List<s_SecurityGroup> securityGroups =
     context.ExecuteQuery<s_SecurityGroup>("select * from s_SecurityGroups").ToList();

    If you go to the designer file, it will show you some pictures like:

    I think that's where you query the data from. Please have a try and let me know if it does not work.

    Best regards
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by liurong luo Monday, November 8, 2010 2:15 AM
    Wednesday, November 3, 2010 5:20 AM