We currently handle projecting through anonymous types, but not non-anonymous types. We should visit the MemberInitExpression and perform entity equality rewriting.
Examples:
```c#
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Entity_equality_through_DTO_projection(bool isAsync)
=> AssertQuery
isAsync,
o => o
.Select(o => new OrderDTO { Customer = o.Customer })
.Where(x => x.Customer != null),
entryCount: 89);
private class OrderDTO
{
public Customer Customer { get; set; }
}
```
Raised in #16719, thanks @smitpatel for first analysis.
Confirmed working with 3.0.0-rc1 馃憤
Thanks for the confirmation!
Most helpful comment
Confirmed working with 3.0.0-rc1 馃憤