LINQ
Language Integrated Query gives you powerful ways to work with a variety of objects in a variety of abstraction patterns – regardless of the type of object, the source of the object's content or how the object was instantiated. Here we've provided coverage of LINQ when building business objects, how to use LINQ to SQL effectively, and how to use LINQ to XML with the OpenXML SDK (the file format for Office 2007 applications).
DT13Leveling the LINQ to XML Playing Field with LINQ to XSD
Leonard Lobel
Tuesday, December 9 – 3:15 p.m.
Contrary to popular belief, all Language-Integrated Query (LINQ) providers are not created equal. In fact, LINQ to XML (formerly known as XLINQ) has thus far proven to be the "weakest LINQ" of them all. Unlike all the other major LINQ providers which give you strongly-typed objects that are abstracted from their underlying data sources, LINQ to XML offers no typed schema definitions (and thus, no type safety) for your code. Instead, you work with generic trees, just like an XmlDocument object (hey, who needs a LINQ provider for that?). There hasn't been much recourse to this limitation beyond writing some fancy code generation tools yourself -- until now, that is, with the release of LINQ to XSD.
Join Lenni as he begins with a quick introduction to general LINQ concepts, and then demonstrates how the new LINQ to XSD provider fills the gaping schema hole left by LINQ to XML. If you've been reluctant to adopt the use of LINQ against the XML data in your .NET applications, LINQ to XSD will give you compelling reasons to reconsider. This new LINQ provider works on top of LINQ to XML, and provides your code with actual typed instances of XML objects -- just like .NET types -- that are based on your XSD schemas (or schemas inferred from your XML data). Attend this session and find out how LINQ to XSD finally delivers the full LINQ story for LINQ to XML.
DW9Programming the Office 2007 Open XML File Formats using LINQ to XML
Ken Getz
Wednesday, December 10 – 1:45 p.m.
Although the Packaging API makes it possible to manipulate the Office Open XML Formats directly, it doesn't make it easy. The Open XML SDK provides a consistent and neat wrapper around the API, making it far easier to get to the parts you need. Once you get to the part, however, you're still simply working with XML content. To make this easier, LINQ to XML provides a superb tool. Both Microsoft Visual C# and Visual Basic provide support for LINQ to XML, and Visual Basic adds specific features that make the process far easier. In this session, see how to use the Open XML SDK and LINQ to XML to manipulate Open XML File Formats. Special attention is paid to the issues involved in handling namespace resolution, a tricky issue in any situation.
DTH4Architect Applications End-to-End with LINQ to SQL
Benjamin Day
Thursday, December 11 – 8:15 a.m.
LINQ to SQL is great for getting objects in and out of a relational database but how does it fit in to an n-tier application? Demos are great but how do you really use it?
How should my application's tiers be organized? What are the best-practices for business objects? How do I incorporate auditing in my application? Can I use a base class for my entities? What are my options for concurrency management? How do I extend the DataContext? What are the best-practices about unit testing? What do I need to know about lazy-loading? Inheritance? How does LINQ To SQL affect my ASP.NET code? In this session, Ben will answer these questions and more. He'll show you what the best practices are for developing an n-tier application with LINQ to SQL and show you how your application should be architected for testability, maintenance, and performance.

