Converting LINQ queries from query syntax to method/operator syntax
Posted by: Fabrice's weblog,
on 06 Feb 2009 |
View original | Bookmarked: 0 time(s)
Yesterday a reader of the LINQ in Action book posted an interesting challenge on the book's forum. It's interesting enough to be reposted it here.
The request was to convert a LINQ query expression (query syntax) to
a query operator call chain (method syntax or dot notation). The
original query was the following one:
from publisher in SampleData.Publishers join book in SampleData.Books on publisher equals book.Publisher into publisherBooks from book in publisherBooks.DefaultIfEmpty() ...