Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild 14.0 Linq Expression Compatibility Issues #10

Open
yousefcodes opened this issue Jan 26, 2016 · 0 comments
Open

MSBuild 14.0 Linq Expression Compatibility Issues #10

yousefcodes opened this issue Jan 26, 2016 · 0 comments

Comments

@yousefcodes
Copy link

Hi,

When using Visual Studio 2015 or MSBuild14.0, the compiler has an issue casting LINQ expressions. While attempting to translate a LINQ Expression to ZOQL, I get this error:

Unable to cast object of type 'System.Linq.Expressions.FieldExpression' to type 'System.Linq.Expressions.ConstantExpression'

This only happens with an expression that consists of two or more conditions, such as:
_zuoraClient.QuerySingle<ZuoraInvoice>( i => i.InvoiceNumber == number && i.CustomerId == account.AccountId);

It does not happen with:
_zuoraClient.QuerySingle<ZuoraInvoice>( i => i.InvoiceNumber == number);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant