score:0
db.ideas
.groupjoin(
db.ideacollaborators,
i => i.id,
ic => ic.idea_id,
(x, y) => new { ideas = x, ideacollaborators = y })
.where(gj => gj.ideas.submitter_id == "peter" | gj.ideacollaborators.firstordefault().user_id == "peter")
.selectmany(
x => x.ideacollaborators.defaultifempty(),
(x, y) => new
{ x.ideas.id, x.ideas.ideastatus_id, y.user_id })
);
Source: stackoverflow.com
Related Query
- How do you perform a left outer join with a where clause using linq lambda extension methods
- How do you perform a left outer join using linq extension methods
- How can I implement a LEFT OUTER JOIN in LINQ using lambda syntax on Entity Framework Core 2.0?
- How to convert multiple SQL LEFT JOIN statement with where clause to LINQ
- LINQ - Left Outer Join with multiple parameters in Where clause
- SQL to LINQ - multiple tables left outer join with where clause referring right table
- LINQ Using inline subquery with min() in a left join where clause
- How to perform LINQ left outer join using method syntax?
- How do you perform a CROSS JOIN with LINQ to SQL?
- Linq-to-Entities: LEFT OUTER JOIN with WHERE clause and projection
- How to rewrite this LINQ using join with lambda expressions?
- How to write a LEFT OUTER JOIN where the right side is null in LINQ to SQL?
- LINQ to Sql Left Outer Join with Group By and Having Clause
- LINQ; How to perform left outer join with multiple conditions?
- How to perform left outer join in Linq
- Entity Framework: How to perform left join with EF and LINQ among multiple tables
- Using Trim in multiple where clause of linq with Join clause
- Linq To Entities, Using where clause on table before left join
- How to perform a LINQ where clause with a dynamic column
- How to extract max(property) from left join in LINQ with lambda expression
- Linq to SQL With Left Outer Join and Group By With Sum - How To
- LINQ join query with multiple fields using left outer join
- How to convert a SQL with multiple left joins to an Entity Framework LINQ statement using Include methods (No Join methods)?
- Linq how to join tables with a where clause on each table and a count
- Left Join on Linq query when also using the Where clause on joint table
- Using LINQ to perform a left outer join
- How to do a Linq Left Outer Join with a middle table?
- How to perform a left join with an additional filtering in LINQ to entities?
- linq groupjoin using lambda with a where clause
- Left Outer join LINQ query with four entities in CRM 2011 and with multiple where clauses
More Query from same tag
- Linq custom comparer for contains?
- c# copied property loses reference when referenced object is removed from list
- How to populate a DropDownList from a SQL database using linq and only select Distinct Values
- Build dictionary from array using Linq
- How can I put the rows on an specific column in a int[]? Visual Studio
- Linq to SQL execute where clause only if external condition exists (if variable = x)
- Linq outer joins
- C# LINQ and Pattern Matching challenge
- Check if each item in a list belongs to certain group and create a new list
- Recursive method to convert flat collection to hierarchal collection?
- Cast IQueryable to a simple object
- Send JSON via POST in C# and Use LINQ to access Objects
- Is there a way to get the SQL created by a LINQ query?
- Variables within lambda/LINQ
- Efficiency of Linq GroupJoin vs. Linq All in Select
- LINQ: Aggregate Rows based on dictionary or mapping?
- Use Separate Elements From XML File
- LINQ to SQL Query Across Entity Sets Optimization
- Expression and Parameter
- Force Linq to entities use inner join (EF 6)
- display images in repeater control from linq datasource
- C# linq select some entities
- Many to many on List
- How to fetch value against list of strings from xml using linq and xpath?
- How to recalculate elements with IEnumerable.Select?
- Find duplicates and return List(class) on a fast way
- Linq multplie where query with or operator
- C# Linq to Entities method to project property to string
- XAttribute default value if not existing on XElement
- Date function problem in SQL and Linq