Created
September 3, 2012 11:55
-
-
Save andrew-t-moore/3608808 to your computer and use it in GitHub Desktop.
Fluent syntax query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = context.Person | |
.GroupJoin(context.Pet, | |
person => person, | |
pet => pet.Owner, | |
(person, pets) => new { person, pets = pets.DefaultIfEmpty() }) | |
.SelectMany(group => group.pets, | |
(row, pet) => new { row.person.FirstName, row.person.LastName, PetName = pet.Name }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment