Azura Azura

Niner since 2005


  • Anders Hejlsberg - LINQ


    I thought for some time how to reply to you… you criticize but do not provide a relevant solution.

    You focus on details in VB, which is like focusing on trees while we are talking about the forest. In any case VB is not used for large enterprise level applications.

    It is arrogant to assume that others understand less or are less intelligent then you.

    Lastly, please focus on the discussion at hand and make relevant posts, keeping your advices to yourself, unless asked for.

  • Anders Hejlsberg - LINQ

    How does one construct a dynamic where clause in LINQ?
    ... Select clause?

    For instance, If we intend to build a screen that allows the user search and display customers using customers' Name, Phone #, City,  and etc...

    Today, a constructed SQL will look apporx like this:

    string sqlStmt = "SELECT * FROM CUSTOMER WHERE ";

    if(txtCity.Text.length() > 0)
        sqlStmt += " CITY = '" + txtCity.Text + "' "; // London ; )


    What will be an equivalent in LINQ to accomplish the above shown sql?