-
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
Query with All and Any evaluates locally #15683
Comments
It do not looks like a bug but misunderstanding how var userSkills = _context.UserSkills
.Where(us => us.UserId == userId)
.Select(z => new {
SkillId = z.SkillId,
SkillLevelId = z.SkillLevelId
});
var lessons = _context.Lessons.AsNoTracking()
.Where(x => x.LessonSkills.All(y =>
userSkills.Any(z => y.SkillId == z.SkillId && y.SkillLevelId <= z.SkillLevelId)))
.ToList(); |
ajcvickers
added
verify-fixed
This issue is likely fixed in new query pipeline.
and removed
consider-for-current-release
labels
Sep 4, 2019
Exception in 3.1
|
Duplicate of #19070 |
smitpatel
added
closed-duplicate
and removed
punted-for-3.1
type-bug
verify-fixed
This issue is likely fixed in new query pipeline.
labels
Dec 10, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Entity Framework Core 2.2 I am trying to execute the following query on the database:
Then I tried the following query:
Exception
This lessons query evaluates in memory and I get the following exception:
I tried a few options like creating a userSkills variable:
And then use userSkills in lessons query instead of user.UserSkills.
But still evaluates locally ... Is this a bug?
Further technical details
EF Core version: 2.2
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: macOS Mojave
IDE: Visual Studio Code 1.33.1
The text was updated successfully, but these errors were encountered: