Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
asydneylover opened this issue Apr 28, 2017 · 4 comments
Closed

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

asydneylover opened this issue Apr 28, 2017 · 4 comments

Comments

@asydneylover
Copy link

asydneylover commented Apr 28, 2017

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
            }
@svick
Copy link
Contributor

svick commented Apr 28, 2017

This is a duplicate of #361.

@lachbaer
Copy link
Contributor

@jnm2 I'm using ```cs instead of ```c#. Easier to type with one hand ;-)

@gafter
Copy link
Member

gafter commented Apr 28, 2017

Per @svick this is a duplicate of #361.

@StevenRasmussen
Copy link

Anyone wanting this MUST go to #361 and click both the up arrow and thumbs up just below the last item for your vote to be counted:
image

Yes... it looks like you're voting for the comment... which is against the idea... but you're actually voting for the idea. You can read the discussion around that in the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants