-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Closed
Copy link
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.LinquntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Background and Motivation
Right now doing left and right joins in linq is horrific and requires a ton of code that shouldn't be necessary if the proper language keywords were added.
Proposed API
Add leftjoin/right join syntax.
Usage Examples
from c in db.Contacts left join d in db.Domains on c.Id equals d.ContactId select new {c, d} //d would be nullable here.
from c in db.Contacts right join d in db.Domains on right c.Id equals d.ContactId select new {c, d} //c would be nullable here.
Of course you could easily write both as left joins so right could be dropped.
Alternative Designs
from c in db.Contacts leftjoin d in db.Domains on c.Id equals d.ContactId select new {c, d} //d would be nullable here.
Risks
Intellisense issues with left join right join because of multi word syntax maybe? Hence the second option.
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.LinquntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner