-
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
"Argument types do not match" when using cast in where clause #13093
Comments
Error in 3.1
We should try to fix this. |
Duplicate of #20097 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been trying to migrate from EF 6 to EF core, but can't figure out how to handle this case (simplified example, see full example below):
When running I get the following exception (unfortunately exception message is in Swedish, but should be same as "Argument types do not match"):
If I comment out any of the above lines in the code above it works, also if I avoid casting to
IEntity
in theWhere
clause.(The actual code is a lot more complex, and I know this particular example could be simplified a lot, but we're using generic helper methods that does most of this for us, and I would like to keep it that way. The example code is just to reproduce the exception.)
Steps to reproduce
Further technical details
EF Core version: 2.1.2.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017 15.8.1
The text was updated successfully, but these errors were encountered: