-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
With SQL Server compat level 170,
int[] ints = [1, 2, 3];
_ = context.Blogs.Where(b => EF.Constant(ints)[b.Id] == 1).ToList();Minimal repro
await using var context = new BlogContext();
await context.Database.EnsureDeletedAsync();
await context.Database.EnsureCreatedAsync();
int[] ints = [1, 2, 3];
_ = context.Blogs.Where(b => EF.Constant(ints)[b.Id] == 1).ToList();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder
.UseSqlServer(Environment.GetEnvironmentVariable("Test__SqlServer__DefaultConnection"), o => o.UseCompatibilityLevel(170))
.LogTo(Console.WriteLine, LogLevel.Information)
.EnableSensitiveDataLogging();
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
}Reactions are currently unavailable