lundi 11 mai 2015

LINQ "contain" using dynamic column name

All i want to do is filter some records using contain operator.
But the problem is the column name is no Dynamic.

Example:

string columnName ="xyz";
var result = myList.where(w => w.GetType().GetProperty(columnName). ... 

when i'm using reflection i'm not getting contain operator on above query.
Please suggest me how to achieve this, or any alternate option of doing this





Aucun commentaire:

Enregistrer un commentaire