I was wanting to create a string of LINQ conditions and then plug it into a LINQ Extension method as in below. Is that possible?
string x = "a.MemberName != null &&
a.MemberName.Contains(RadGrid1.MasterTableView.GetColumn(\"MemberName"\).CurrentFilterValue)";
var filtered1 = listFromCache.Where(a => x);
If your intention is to build a dynamic Linq query, then I suggest you use Expression Trees. You can create an Expression Tree describing the logic and then you can simply call Expression.Lambda to compile the tree to a delegate.
Here is the reference documentation:
http://msdn.microsoft.com/en-us/library/bb397951.aspx
Edit:
Some sample code follows. I don’t know what
RadGrid1.MasterTableView.GetColumn(\"MemberName"\).CurrentFilterValueis, so I used “CurrentFilterValue” as a placeholder for what that statement evaluates to.