ordercloud-api / ordercloud-dotnet-sdk

The official .NET SDK for the OrderCloud eCommerce platform
MIT License
15 stars 14 forks source link

ListOptionsBuilder does not support unary expressions for filters #93

Closed alexander-vakulyuk closed 2 years ago

alexander-vakulyuk commented 2 years ago

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.