We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DbSet<T>
IQueryable<T>
null
The code is intentionally simple, the ids could be conditionally selected.
ids
Works fine in 8.
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Diagnostics; using var db = new MyContext(); var ids = db.Items.Select(c => c.Id); db.Items.Where(r => ids != null && ids.Contains(r.Id)).Load(); class MyContext : DbContext { public DbSet<Item> Items { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder .UseSqlite("Data Source=triage.db") .LogTo(Console.WriteLine, filter: (id, level) => id == RelationalEventId.CommandExecuting) .EnableSensitiveDataLogging(); } } class Item { public int Id { get; set; } public string? Name { get; set; } }
The LINQ expression 'DbSet<Item>() .Where(i => DbSet<Item>() .Select(i0 => i0.Id) != null && DbSet<Item>() .Select(i1 => i1.Id) .Contains(i.Id))' could not be translated.
9.0.1
N/A
net9.0
The text was updated successfully, but these errors were encountered:
cincuranet
No branches or pull requests
Bug description
The code is intentionally simple, the
ids
could be conditionally selected.Works fine in 8.
Your code
Stack traces
Verbose output
EF Core version
9.0.1
Database provider
N/A
Target framework
net9.0
Operating system
N/A
IDE
N/A
The text was updated successfully, but these errors were encountered: