score:3
Accepted answer
var results = from t1 in table1
let t2 = (from t in table2 select t)
where t1.date == t2.date
select new MyModel {
TheDate = t1.date == null ? t2.date : t1.date,
Data1 = t1.data1,
Data2 = t2.data2,
Data3 = t2.data3
};
Source: stackoverflow.com
Related Articles
- Left outer join using LINQ -- understanding the code
- LINQ Source Code Available
- How can I code an outer join using LINQ and EF6?
- creating Linq to sqlite dbml from DbLinq source code
- linq join question
- source code for LINQ 101 samples
- Linq Join Question
- How to join one row to every row in source table using LINQ
- Linq join efficiency question
- c# Linq or code to extract groups from a single list of source data
- LINQ - outer join to parent class in EF code first
- Convert sql code to linq (Inner join Query)
- linq join code doesn't work
- Why this multi linq join code does not work?
- LEFT OUTER JOIN in LINQ
- How do you perform a left outer join using linq extension methods
- Convert string[] to int[] in one line of code using LINQ
- How to do joins in LINQ on multiple fields in single join
- LINQ - Full Outer Join
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- LINQ to SQL - Left Outer Join with multiple join conditions
- LINQ to SQL Left Outer Join
- How do you perform a CROSS JOIN with LINQ to SQL?
- LINQ Join with Multiple Conditions in On Clause
- Linq code to select one item
- How to perform Join between multiple tables in LINQ lambda
- Why is LINQ JOIN so much faster than linking with WHERE?
- Convert SQL to Linq left join with null
- LEFT JOIN in LINQ to entities?
- LINQ to SQL multiple tables left outer join
- Simplify Entity Framework Core query
- NHibernate: HasMany components and Where/Contains clause
- Whether to use AsEnumerable() in LINQ or not?
- VB.net linq left join where null or 0
- How to pivot DataTable by Column
- Add List objects from a single list to a new List using LINQ
- Getting back the number of added digits
- Does Object implement the IEnumerable interface C#?
- Anonymous types mismatch LINQ to SQL query?
- Equivalent of http://localhost/Odata/User(1)/Contacts in .NET webapi Odata Client
- Can't call the Elements() method for System.Xml.Linq in Webmatrix site
- Having some trouble understanding Linq's INTO keyword
- using linq to orderBy in list of lists
- Using Distinct with Linq to SQL
- C# Using Linq Union method with yield
- LINQ to create new records in a XML file
- How can I query an ID-Name pair in LINQ for duplicate names?
- What is the fastest way to filter a list of strings when making an Intellisense/Autocomplete list?
- Contains on array of int
- MVC3 Razor View Engine