Skip to content

Add new keyword "leftjoin" to make LINQ more readable #508

@asydneylover

Description

@asydneylover

LINQ is amazing, but only if I don't need to do left / right outer join, the solution to use the DefaultIfEmpty() method looks weird.
I wish if C# could extend it keywords to add "leftjoin", "rightjoin" so that I can simply code as following:

var q = from c in db.Categories
            leftjoin p in db.Products on c.CategoryID equals p.CategoryID
            select new 
            {
                     p.ProductName, 
                     c.CategoryName
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions