-
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
.Contains fails with using a IReadOnlySet #26437
Comments
@smitpatel to find dupe. |
No dupe, need to update following method efcore/src/Shared/MethodInfoExtensions.cs Lines 14 to 19 in cc53b3e
IReadOnlyCollection doesn't derive from ICollection causing us to fail in this case. |
@smitpatel Related to #26433 or not? |
Not related. #26433 is on navigation property which is readonly collection. This one is client side object being readonly collection. |
File a bug
.Contains fails with using a IReadOnlySet.
Include your code
To fix any bug we must first reproduce it. To make this possible, please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing.
It is often impossible for us to reproduce a bug when working with only code snippets since we have to guess at the missing code.
Use triple-tick code fences for any posted code. For example:
A work-around is to explicitly cast it to the
IEnumerable<int>
base interface.Include stack traces
Include the full exception message and stack trace for any exception you encounter.
Use triple-tick fences for stack traces. For example:
Include provider and version information
EF Core version: 5.0.10
Database provider: Microsoft.EntityFrameworkCore.SqlServer 5.0.10
Target framework: .NET 5.0
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: