scottksmith95 / LINQKit

LINQKit is a free set of extensions for LINQ to SQL and Entity Framework power users.
MIT License
1.63k stars 163 forks source link

Simplify LeftJoin-extension #174

Closed TheConstructor closed 2 years ago

TheConstructor commented 2 years ago

This should archive the same result, but would be way more readable. Also it doesn't require reflection.

It may also be possible to merge the remapping from a separate Select into the SelectMany, but I don't know, if this is something EF (Core) would always understand right.

TheConstructor commented 2 years ago

Added a test; with EF Core 5/6 my implementation works, while the original solution can not be translated by EF Core (Exception). Please verify against older targets, as I don't have them handy right now.

TheConstructor commented 2 years ago

@StefH I am pretty sure I did, but I opened this PR 5 months ago 😅