The following code:
new ListOptionsBuilder<Order>().AddFilter(o => o.Status == OrderStatus.Unsubmitted).Build();
will throw an InvalidCastException, bacause the left part of the binary expression is an UnaryExpression, rather than a MemberExpression.
The following code:
new ListOptionsBuilder<Order>().AddFilter(o => o.Status == OrderStatus.Unsubmitted).Build();
will throw anInvalidCastException
, bacause the left part of the binary expression is anUnaryExpression
, rather than aMemberExpression
.