score:3
Accepted answer
it would be something like this:
dim joinedresult = from t1 in table1
group join t2 in table2
on t1.key equals t2.key
into righttableresults = group
from t2 in righttableresults.defaultifempty
select t1.prop1,
t2.prop2
i'm not a vb guy (anymore), but i think this would work.
score:0
you can simply use the existing join method
public static ienumerable<tresult> join<touter, tinner, tkey, tresult>(
this ienumerable<touter> outer,
ienumerable<tinner> inner,
func<touter, tkey> outerkeyselector,
func<tinner, tkey> innerkeyselector,
func<touter, tinner, tresult> resultselector
)
eg:
table1.join(table2, t1 => t1.key, t2 => t2.key, (t1, t2) => new { table1 = t1, table2 = t2 });
can find more overloads and examples http://msdn.microsoft.com/en-us/library/system.linq.enumerable.join.aspx
pardon me for c# examples
Source: stackoverflow.com
Related Query
- Left outer join using LINQ -- understanding the code
- LEFT OUTER JOIN in LINQ
- How do you perform a left outer join using linq extension methods
- LINQ to SQL - Left Outer Join with multiple join conditions
- LINQ to SQL Left Outer Join
- LINQ to SQL multiple tables left outer join
- How to limit a LINQ left outer join to one row
- left outer join in lambda/method syntax in Linq
- Extension method for IQueryable left outer join using LINQ
- Linq - Left outer join with dot notation
- LINQ left outer join query error: OuterApply did not have the appropriate keys
- Linq left outer join with custom comparator
- Linq Left Outer Join - DefaultIfEmpty Error
- Left Outer Join - LINQ to Datatable
- linq to sql: specifying JOIN instead of LEFT OUTER JOIN
- EF Linq to Entities calling ToList() on entity set generates SQL command containing multiple left outer join
- How can I implement a LEFT OUTER JOIN in LINQ using lambda syntax on Entity Framework Core 2.0?
- VB.Net LINQ - left outer join between two datatables - limit to one row
- Unable to convert SQL Query to LINQ Query for Left Outer Join
- How can I code an outer join using LINQ and EF6?
- LINQ Left Outer Join combined with Let
- Left outer Join with LINQ
- How to write a LEFT OUTER JOIN where the right side is null in LINQ to SQL?
- Left outer join null using VB.NET and LINQ
- Linq left outer join not working using DefaultIfEmpty
- Linq to Entities Left outer join grouped into a collection
- C# - Dynamic Linq left outer join on multiple properties
- Converting left outer join on two queries to LINQ
- Left outer join in linq
- How to add left outer join to grouped and summed LINQ query
More Query from same tag
- Linq to Xml: Is XDocument a caching reader?
- .NET LINQ to entities group by date (day)
- LINQ: why this query works in query syntax but not in method syntax?
- C# LINQ and XML Parsing with Separate Sections
- How to safely .ToLower().Contains() on possible null property
- Load image to ReportView dynamically
- GroupBy and sum to dictionary
- Simple Linqpad Linq join statement, select all fields
- C# Linq select/join with custom return type
- C# iteration and interpolation syntax
- Construct AndAlso/OrElse LINQ expression with custom method
- Linq cast to list<T>
- Linq query with GroupBy
- GroupBy item and Sum Quantities of items
- Linq Performance: (ElementAt,Count) vs (foreach)
- Foreaching through grouped linq results is incredibly slow, any tips?
- Workaround to take invalid LINQ methods out of the query in generic method
- Need help figuring out a LINQ query w/ EF
- conditional operator in linq sql
- Passing an expression from a LINQ Queryable
- Get list of months from List<DateTime>
- LINQ-to-SQL Query Returning No Results
- Add new node to xml tree
- Equivalent of Left outer join in LINQ
- Selecting all child objects in Linq
- How to do a string compare using regex and linq to sql
- How to join two arrays in a LINQ query and use the result further in the query?
- I have loaded Excel files into .NET using LINQ, now how to bulk insert data into DB (oracle) tables?
- How to convert json to google chart data?
- Dynamic Expression using LINQ. How To Find the Kitchens?