-
Notifications
You must be signed in to change notification settings - Fork 256
Open
Milestone
Description
We could translate to the following PostgreSQL-specific syntax:
SELECT *
FROM Table
WHERE (Id, Type) IN ((1, 1), (2, 1))LINQ for this could be:
var blogs = ctx.Blogs
.Where(p => (new[] { new { Id = 1, Type = 1, Title = "New" } })
.Contains(new { p.Id, p.Type, p.Title }))
.ToList();Or for entity equality:
var blogs = ctx.Blogs.Where(b => new[]
{
new Blog { Id = 1, Type = 1 },
new Blog { Id = 2, Type = 1 }
}.Contains(b)).ToList();We could even translate Any/All to this.
Originally requested by @dmitryshunkov in dotnet/efcore#14661 (comment)
austindrenski, dmytroshunkov, jeremycook, georg-jung, cailenmusselman and 34 more
Metadata
Metadata
Assignees
Labels
No labels