Geeks With Blogs
Etienne Giust's .NET notes Some .NET tips and tricks for me to remember. That might help you too Entity Framework
Left join with Entity Framework (Method Syntax)
Here is a problem I encountered recently trying to perform a simple SQL operation using method syntax of Entity Framework. I had 2 IEnumerable<Object> datasets (dataset1 and dataset2). I wanted to join them to obtain a third dataset without loosing dataset1 records not referencing dataset2 records. To put it simply, I needed a Left Join from dataset1 to dataset2. The syntax would be straightforward in SQL; it would go like that : SELECT D1.Id, D1.Whatever, D2.Id, D2.Something FROM dataset1 ......

Posted On Friday, February 15, 2013 6:01 AM

Copyright © Etienne Giust | Powered by: