mercredi 22 février 2017

Expresion Call with Type Combining lambda linq where

I am trying to create a dynamic lookup filter for a DataTable.

The code look currently like this, I am looping through each Row/Column. (one table feed the other one)

    DataRow FoundRow=null;
             foreach (string ID in IDToCheck)

                        FoundRow = IdTable.AsEnumerable().Where(row => row.Field<string>(ID).Equals(
                            RowInfo[ID].ToString(),StringComparison.InvariantCultureIgnoreCase)).First();
DoStuffWith(FoundRow);
        }

I do not manage to convert the row.Field<string>(ID) to Expression.Call.

I am trying to reproduce the exemple of Microsoft.

Thank you,





Aucun commentaire:

Enregistrer un commentaire