none
Dynamic LINQ query parser? RRS feed

  • General discussion

  • I've been searching around to see if there exists some class or classes in the Framework which will generate an expression tree from a LINQ query string (outside of the code).

    I would like to be able to take a string value which represents a SQL-like query and do the same think the compiler does to a IQueryable string embedded in C# code, which is generate an expression tree from it.

    I have found a reference to something similar from one of ScottGu's posts: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx.

    After looking at Dynamic.cs, pointed to by that post, I was surprised that it basically contained all the code to parse the query itself.  I was hoping the code the compiler uses to generate the expression tree might be exposed so that I can make use of the same logic as opposed to me writing the code myself and possibly generating something different that what the compiler generates.

    Thanks,

    Nick

    Wednesday, June 29, 2011 2:20 AM

All replies

  • Hi Nick,

    Thanks for your post and your good feedbacks.

    We will talk about this with Microsoft engineers who come from product team. And if we have any updates, we will let you know.

    I think let your thread be a discussion is more suitable. I will change the type.

    Thanks again for your support.

     

    Good day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, July 4, 2011 2:20 PM
    Moderator