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() ...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: XLinq | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 978 | Hits: 48

Similar Posts

  • Serialising Microsoft StreamInsight QueryTemplates more
  • An Extensive Examination of LINQ: Grouping and Joining Data more
  • The MethodLinq concept more
  • Checking for EF to TSQL Query Compilation Changes in VS2010 Beta1 more
  • An Extensive Examination of LINQ: Using the Query Syntax more
  • An Extensive Examination of LINQ: The Standard Query Operators more
  • An Extensive Examination of LINQ: The Ins and Outs of Query Operators more
  • An Extensive Examination of LINQ: Lambda Expressions and Anonymous Types more
  • Create custom LINQ providers fluently more
  • An Extensive Examination of LINQ: Extension Methods, Implicitly Typed Variables, and Object Initializers more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD