-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
SqlServer-2.1 - InvalidCastException (Int32 to Boolean) #12280
Comments
Possible duplicate of #12175 since they both involve empty Contains. /cc @maumar @smitpatel |
Duplicate of #12175 |
Verified fixed in nightlies |
This is approved for 2.1.3. Do not merge yet; branch is expected to open Monday. Given these issues have been parked for some time, please be careful to ensure the correct commits get into the correct branches. |
@maumar This issue is approved for patch and the release\2.1 branch is now open for merging. Please ensure:
|
Merged to 2.1 in 77512c4 |
Simple .Select projection throws in Microsoft.EntityFrameworkCore.SqlServer 2.1 (worked fine in 2.0 or Memory DB of any version)
Steps to reproduce
Full repro as attachment, core of the issue is this snippet:
It is specific to .Contains on empty list. Various workarounds:
This seems like repeat of issue #2246, but that one was fixed two years ago, now it's back again in 2.1. I couldn't find anything similar in currently open issues.
Further technical details
EF Core version: 2.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017 15.7.3
repro-invalid-cast.zip
The text was updated successfully, but these errors were encountered: