I have the following class:
public class Order
{
public string Code { get; set; }
}
And I have built dynamically an Expression
, which looks like this:
and I'm building an extension method which looks like:
I have a list of orders which, List<Order>
of the expression type and when I apply the filter like this:
var buildExpressionFilter = dynamically constructed Expression here
var orders = GetOrders();
var result = orders.Where(buildExpressionFilter).ToList();
I get the following error:
Is obviously that buildExpressionFilter is not properly constructed but I cannot figure out what is the issue.
Does anyone have an idea on how to fix this issue? What may be wrong with my buildExpressionFilter?
Aucun commentaire:
Enregistrer un commentaire