<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Wooley's LINQ Wonderings</title><link>http://linqinaction.net/blogs/jwooley/default.aspx</link><description>Insights and observations regarding LINQ</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/WooleysLinqWonderings" type="application/rss+xml" /><item><title>Screen scraping and creating Word documents with LINQ to XML</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/310583858/screen-scraping-and-creating-word-documents-with-linq-to-xml.aspx</link><pubDate>Thu, 12 Jun 2008 18:22:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:3445</guid><dc:creator>jwooley</dc:creator><slash:comments>1</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/3445.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=3445</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=3445</wfw:comment><description>&lt;P&gt;At TechEd Developers 2008 in Orlando, I had the pleasure of competing in Speaker Idol. In that competition, we had the opportunity to present a topic in 5 minutes. Unfortunately, the topic I choose really needed 10 minutes to cover at the level of detail it needed. Instead of limiting the topic, I decided to go ahead and present it a bit too fast. &lt;/P&gt;
&lt;P&gt;If you want to see the video, or see how to use VB 9's XML Literals and LINQ to XML to fetch data from a web page (that must be XHtml compilant), manipulate it and insert it into a Word 2007 file, it is now available on the&amp;nbsp; &lt;A&gt;Developer Landing&lt;/A&gt; page, and the &lt;A&gt;Library&lt;/A&gt; page. of the TechEd site. If you prefer, you can jump right to the video in either &lt;A href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_Speakeridol_02_low.wmv"&gt;WMV&lt;/A&gt; or &lt;A href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_Speakeridol_02_high.mp4"&gt;MP4&lt;/A&gt;&amp;nbsp;file formats. If you're not familiar with LINQ to XML, go ahead and download the video and just watch it at half speed ;-)&lt;/P&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=3445" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/310583858" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/vb+linq+xml+word+xhtml/default.aspx">vb linq xml word xhtml</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/06/12/screen-scraping-and-creating-word-documents-with-linq-to-xml.aspx</feedburner:origLink></item><item><title>LINQ to SQL's support for POCO</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/310094756/linq-to-sql-s-support-for-poco.aspx</link><pubDate>Thu, 12 Jun 2008 02:25:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:3442</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/3442.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=3442</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=3442</wfw:comment><description>&lt;P&gt;One of the strengths that LINQ to SQL has over the upcoming Entity Framework is its support for POCO, or Plain Old Class Objects. With LINQ to SQL, the framework doesn't require any particular base classes, interfaces or even reliance on the 3.5 framework for the resulting objects. I demonstrated this in the talk I did at the Teched Tweener weekend. Download the &lt;A href="http://thinqlinq.com/Downloads/LinqToSqlBeyondTheBasics.zip"&gt;demo project&lt;/A&gt; to see this in action.&lt;/P&gt;
&lt;P&gt;In this sample, I created two separate projects. The first class library project, I created only targeting the 2.0 framework. As a result the project can not use any LINQ specific techniques. This will also allow us to consume the resulting objects in projects that do not have access to the newer framework, or to all of the namespaces. This is particularly important in cases like Silverlight. To call attention to the differences in the projects, I declared the 2.0 project in C# and the LINQ enabled project in VB. &lt;/P&gt;
&lt;P&gt;The 2.0 class library project consists of a single class file. This represents the Subject entity from the &lt;A href="http://www.linqinaction.net/"&gt;Linq In Action&lt;/A&gt; database.&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;namespace&lt;/SPAN&gt; UnmappedClasses&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;{&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR:#2b91af;"&gt;Subject&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:#2b91af;"&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:#2b91af;"&gt;Guid&lt;/SPAN&gt; ID { &lt;SPAN style="COLOR:blue;"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR:blue;"&gt;set&lt;/SPAN&gt;; }&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;string&lt;/SPAN&gt; Name { &lt;SPAN style="COLOR:blue;"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR:blue;"&gt;set&lt;/SPAN&gt;; }&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;string&lt;/SPAN&gt; Description { &lt;SPAN style="COLOR:blue;"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR:blue;"&gt;set&lt;/SPAN&gt;; }&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;}&amp;nbsp; &lt;/DIV&gt;
&lt;P style="BACKGROUND:white;COLOR:black;"&gt;Notice here, there are no interfaces, base classes or custom attributes. Excluding the attributes is critical here because the standard&amp;nbsp;&amp;lt;Table&amp;gt; and&amp;nbsp;&amp;lt;Column&amp;gt; attributes&amp;nbsp;reside in the System.Data.Linq.Mapping namespace which would not be supported in the&amp;nbsp;2.0 framework. &lt;/P&gt;
&lt;P&gt;Admittedly, it consists of three auto-implemented properties. Auto-implemented properties are used for brevity here and are consumable by the .Net 2.0 Framework because it relies on compiler features rather than runtime features.&lt;/P&gt;
&lt;P&gt;Because we can't allow the class structure to include the attributes, we can't use the LINQ to SQL designer classes or SQL Metal to generate our classes. We do need to have a way to indicate the mapping to our data store. Here is where the XML Mapping file comes in handy. &lt;/P&gt;
&lt;P&gt;When instantiating the DataContext, we can either rely on the inline attributes, or an external mapping file. Luckily, the XML mapping file's structure is concise and very similar to the attributes that would have been applied to the class otherwise.&amp;nbsp;The main difference we need to do is indicate the Type that is used for a given table since we are not&amp;nbsp;directly annotating the class itself.&amp;nbsp;The other difference you may notice is that I don't include the Storage attribute. While there is nothing to stop me from using that in a Mapping source, we can't identify the backing field when using auto-implemented properties.&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;version&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;?&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Database&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;lia&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;http://schemas.microsoft.com/linqtosql/mapping/2007&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;dbo.Subject&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Member&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;Subject&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;UnmappedClasses.Subject&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;ID&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Member&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;ID&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;DbType&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;UniqueIdentifier NOT NULL&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;IsPrimaryKey&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;Name&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Member&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;Name&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;DbType&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;VarChar(100) NOT NULL&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;CanBeNull&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;Description&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;Member&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;Description&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR:red;"&gt;DbType&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt;VarChar(200)&lt;/SPAN&gt;"&lt;SPAN style="COLOR:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp; &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR:#a31515;"&gt;Database&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Now, with that out of the way, we can get to the LINQ portion of the work. Actually, that is quite easy. In our 3.5 enabled project, we will create a XmlMappingSource, pass it into the constructor of the DataContext and then fetch the object from this context as we would any other LINQ enabled class.&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;Dim&lt;/SPAN&gt; map = XmlMappingSource.FromXml(XDocument.Load(&lt;SPAN style="COLOR:#a31515;"&gt;"C:\Projects\LINQ\AdvancedLinqToSql\WinformDemo\lia.map"&lt;/SPAN&gt;).ToString)&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&lt;SPAN style="COLOR:blue;"&gt;Using&lt;/SPAN&gt; dc &lt;SPAN style="COLOR:blue;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;New&lt;/SPAN&gt; DataContext(&lt;SPAN style="COLOR:blue;"&gt;My&lt;/SPAN&gt;.Settings.liaConnectionString, map)&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:blue;"&gt;Me&lt;/SPAN&gt;.SubjectBindingSource.DataSource = dc.GetTable(&lt;SPAN style="COLOR:blue;"&gt;Of&lt;/SPAN&gt; UnmappedClasses.Subject)()&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&lt;SPAN style="COLOR:blue;"&gt;&amp;nbsp;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Using&lt;/SPAN&gt;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="COLOR:blue;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;This example happens to bind the results to a Winform object binding source, but you could expose it to ASP directly, through an encapsulation layer, like a repository pattern, or a service interface.&lt;/P&gt;
&lt;P&gt;Crossposted from &lt;A href="http://www.thinqlinq.com/"&gt;www.ThinqLinq.com&lt;/A&gt; &lt;/P&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=3442" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/310094756" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ+VB+C_2300_/default.aspx">LINQ VB C#</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/06/11/linq-to-sql-s-support-for-poco.aspx</feedburner:origLink></item><item><title>LINQ in Action at TechEd Developer 2008 in Orlando</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/303816934/linq-in-action-at-teched-developer-2008-in-orlando.aspx</link><pubDate>Tue, 03 Jun 2008 15:41:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:3378</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/3378.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=3378</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=3378</wfw:comment><description>&lt;IMG src="http://www.thinqlinq.com/images/techedbooks.jpg" align=right&gt;If you're at Tech Ed Developer in Orlando, make sure to find me. If you miss me on the convention floor, I'll also be participating in Speaker Idol on Wednesday 6/4 at noon. In addition, I will be doing&amp;nbsp;a book signing in the store at 1:00 on Thursday, 6/5. As you can see from this picture, they have a couple copies of the book that you can buy if you didn't bring your copy. I look forward to meeting you.&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=3378" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/303816934" height="1" width="1"/&gt;</description><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/06/03/linq-in-action-at-teched-developer-2008-in-orlando.aspx</feedburner:origLink></item><item><title>Danny Simmons compares the Entity Framework to similar technologies</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/299512712/danny-simmons-compares-the-entity-framework-to-similar-technologies.aspx</link><pubDate>Wed, 28 May 2008 02:37:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:3336</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/3336.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=3336</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=3336</wfw:comment><description>&lt;DIV class=story&gt;
&lt;P&gt;It seems that everyone else is chiming in on Danny Simmons' &lt;A href="http://blogs.msdn.com/dsimmons/archive/2008/05/17/why-use-the-entity-framework.aspx"&gt;&lt;FONT color=#ff0000&gt;recent comparisons&lt;/FONT&gt;&lt;/A&gt; of the Entity Framework with other similar technologies. There are several items I wanted to address from his observations. &lt;/P&gt;
&lt;P&gt;Regarding the EF vs. LINQ to SQL, he makes two basic points: 1) That there isn't a provider model for other data sources and 2) That LINQ to SQL requires a 1-1 table to object mapping. On the second item, there is no denying the limitation. While you can work around the issue with LINQ to SQL's support for views, stored procs, and functions, this is the key differentiator between LINQ to SQL and the Entity Framework. Danny's statements regarding inheritance limitations and entity splitting both stem back to the TPH (table per hierarchy) limitation of LINQ to SQL.&lt;/P&gt;
&lt;P&gt;Regarding the issue with the provider model, the original intent was to have a full provider model which vendors would be able to consume. When the ADO vNext initiatives came out, it was fairly clear that the provider model would be supported in the Entity Framework. As a result, the provider model for LINQ to SQL was essentially shelved. That was the genesis of Matt Warren's series on &lt;A href="http://blogs.gotdotnet.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx"&gt;&lt;FONT color=#ff0000&gt;building an IQueryable provider &lt;/FONT&gt;&lt;/A&gt;which basically outlines how one would go about building a provider for LINQ. Since Matt has basically handed the LINQ to SQL code base over to Danny's team, we'll see where this progresses.&lt;/P&gt;
&lt;P&gt;In Danny's discussions of other technologies, he seemingly makes two contradictory statements. In the beginning he states,&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT:0px;"&gt;
&lt;P&gt;"... the truth is that different&amp;nbsp;problems merit different solutions."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;He then goes on to the statement:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT:0px;"&gt;
&lt;P&gt;"This makes it easier to create a conceptual model which is how you want to think about your data and then reuse that conceptual model for a number of other services besides just building objects.&amp;nbsp; Long-term we are working to build EDM awareness into a variety of other Microsoft products so that if you have an Entity Data Model, you should be able to automatically create REST-oriented web services over that model (ADO.Net Data Services aka Astoria), write reports against that model (Reporting Services), synchronize data between a server and an offline client store where the data is moved atomically as entities even if those entities draw from multiple database tables on the server, create workflows from entity-aware building blocks, etc. etc."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;By this, he is indicating that the EF should be the defacto mechanism for building the entity structures around which the various components of your system will be built. Thus one tool to answer the various solutions. Is the EF really the best way to expose relational data from a reporting or analysis perspective, time and performance analyses will tell. He does go on in the comments to his post indicating that he&amp;nbsp;is not necessarily advocating re-using the same entities for all of these various application components, but rather to use a similar tooling to create the potentially separate entities&amp;nbsp;that each subsystem will consume.&amp;nbsp;While it makes the programmatic portion&amp;nbsp;easier, the jury is still out on the other areas.&lt;/P&gt;
&lt;P&gt;I'm still getting up to speed on the EF, but do have concerns regarding the POCO (Plain Old Class Objects) story and some of the other requirements that the EF puts on your entity and database models.&lt;/P&gt;
&lt;P&gt;Crossposted from &lt;A class="" title="ThinqLinq responds to Danny Simmons on the Entity Framework" href="http://www.thinqlinq.com/Default/Danny-Simmons-compares-the-Entity-Framework-to-similar-technologies.aspx"&gt;http://www.thinqlinq.com/Default/Danny-Simmons-compares-the-Entity-Framework-to-similar-technologies.aspx&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=3336" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/299512712" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ+Entity+Framework/default.aspx">LINQ Entity Framework</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/05/27/danny-simmons-compares-the-entity-framework-to-similar-technologies.aspx</feedburner:origLink></item><item><title>Projecting an unmapped property into an anonymous type with LINQ to SQL</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/286435661/projecting-an-unmapped-property-into-an-anonymous-type-with-linq-to-sql.aspx</link><pubDate>Thu, 08 May 2008 23:40:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:3217</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/3217.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=3217</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=3217</wfw:comment><description>&lt;DIV class=story&gt;On page 216 of &lt;A href="http://www.linqinaction.net/"&gt;&lt;FONT color=#ff0000&gt;LINQ in Action&lt;/FONT&gt;&lt;/A&gt;, I made a comment that unmapped properties in a mapped class cannot be used in a LINQ to SQL projection. This was true with the beta bits, but only partially true with the release bits. To begin, let's consider the Author table we have in the book samples. 
&lt;P&gt;The Author class has separate fields for the first and last name. Each of these&amp;nbsp;is mapped to the corresponding fields in the Author table. In the book, we show how you can create a read only property in a partial class (so that it won't get clobbered when we regenerate our classes in the designer). The new property is trivial:&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;FONT-FAMILY:Consolas;"&gt;&lt;PRE style="MARGIN:0px;"&gt;   &lt;SPAN style="COLOR:blue;"&gt;Partial&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Class&lt;/SPAN&gt; Author&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;        &lt;SPAN style="COLOR:blue;"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;ReadOnly&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Property&lt;/SPAN&gt; FormattedName() &lt;SPAN style="COLOR:blue;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;String&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;Get&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                &lt;SPAN style="COLOR:blue;"&gt;Return&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Me&lt;/SPAN&gt;.FirstName &amp;amp; &lt;SPAN style="COLOR:#a31515;"&gt;" "&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="COLOR:blue;"&gt;Me&lt;/SPAN&gt;.LastName&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Get&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;        &lt;SPAN style="COLOR:blue;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Property&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;    &lt;SPAN style="COLOR:blue;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Class&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Notice here that there are no mapping attributes to this property. In part, that is because there is no corresponding field in the table. As we show in the book, you are free to query the author table and return Author objects. From there, you can display the FormattedName as follows:&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;FONT-FAMILY:Consolas;"&gt;&lt;PRE style="MARGIN:0px;"&gt;&amp;nbsp;&lt;SPAN style="COLOR:blue;"&gt;          Dim&lt;/SPAN&gt; authors = &lt;SPAN style="COLOR:blue;"&gt;From&lt;/SPAN&gt; a &lt;SPAN style="COLOR:blue;"&gt;In&lt;/SPAN&gt; context.Authors _&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                          &lt;SPAN style="COLOR:blue;"&gt;Select&lt;/SPAN&gt; a&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;Each&lt;/SPAN&gt; a &lt;SPAN style="COLOR:blue;"&gt;In&lt;/SPAN&gt; authors&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                Console.WriteLine(a.FormattedName &amp;amp; &lt;SPAN style="COLOR:#a31515;"&gt;"; "&lt;/SPAN&gt; &amp;amp; a.WebSite)&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;This works fine because we are projecting the complete Author type. However, in early builds, we couldn't project the unmapped properties into an anonymous type like this:&lt;/P&gt;
&lt;DIV style="BACKGROUND:white;COLOR:black;FONT-FAMILY:Consolas;"&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;Dim&lt;/SPAN&gt; authors = &lt;SPAN style="COLOR:blue;"&gt;From&lt;/SPAN&gt; a &lt;SPAN style="COLOR:blue;"&gt;In&lt;/SPAN&gt; context.Authors _&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                          &lt;SPAN style="COLOR:blue;"&gt;Select&lt;/SPAN&gt; a.FormattedName, a.WebSite&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;If you tried to use this projection, you would get a runtime exception. In the RTM bits, the behavior was modified. Now, if you try to run the above query (sample 8.25 in the book samples for anyone following along). You will see that the query succeeds and the anonymous type is used. So how can they know how to populate the FormattedName when it is not mapped and doesn't exist in the table itself? No, the provider doesn't look inside the property, determine the mapped properties that are used, and fetch them. While that could work in our simple example, many unmapped properties&amp;nbsp; would use significantly more resources, many of which may not be members of our class, or methods without direct translation in TSQL. If you look at the generated SQL that is issued when the query is consumed, you might be able to figure out what is happening in this case.&lt;/P&gt;
&lt;P style="MARGIN-LEFT:40px;"&gt;SELECT [t0].[ID], [t0].[LastName], [t0].[FirstName], [t0].[WebSite], [t0].[TimeStamp] &lt;BR&gt;FROM [dbo].[Author] AS [t0]&lt;/P&gt;
&lt;P&gt;Notice here, our select clause to the database is not optimized to only return the fields we requested. Instead, all of the fields are returned. So what's going on? They discovered in evaluating the Select clause that there were unmapped properties. At that point, they just turned around and populated a full author object. Using this object, the provider turns around and generates the anonymous type from the object rather than directly from the underlying data store directly. It's a bit of smoke and mirrors at this point.&lt;/P&gt;
&lt;P&gt;So the question that came up asks if the next printing of the book needs to be adjusted to remove the statement that you can't project an unmapped property. While you can indeed project these properties, you can't use them elsewhere in the query. Thus if you wanted to sort the data based on the unmapped property, the exception would be thrown. Consider the following query./p&amp;gt; 
&lt;DIV style="BACKGROUND:white;COLOR:black;FONT-FAMILY:Consolas;"&gt;&lt;PRE style="MARGIN:0px;"&gt;            &lt;SPAN style="COLOR:blue;"&gt;Dim&lt;/SPAN&gt; authors = &lt;SPAN style="COLOR:blue;"&gt;From&lt;/SPAN&gt; a &lt;SPAN style="COLOR:blue;"&gt;In&lt;/SPAN&gt; context.Authors _&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                          &lt;SPAN style="COLOR:blue;"&gt;Order&lt;/SPAN&gt; &lt;SPAN style="COLOR:blue;"&gt;By&lt;/SPAN&gt; a.FormattedName _&lt;/PRE&gt;&lt;PRE style="MARGIN:0px;"&gt;                          &lt;SPAN style="COLOR:blue;"&gt;Select&lt;/SPAN&gt;  a.FormattedName, a.WebSite&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;In this case when we try to run it, we get the following error:&lt;/P&gt;
&lt;P style="MARGIN-LEFT:40px;"&gt;"System.NotSupportedException: The member 'LinqInAction.LinqBooks.Common.VB.SampleClasses.Ch8.Author.FormattedName' has no supported translation to SQL."&lt;/P&gt;
&lt;P&gt;Because of this, I plan to leave the note in the chapter warning you of using the unmapped property in your query. Unfortunately, I don't have enough space in the book to insert this complete explanation at this time. I hope this explanation helps some of you who are confused at this point.&lt;/P&gt;
&lt;P&gt;Crossposted from &lt;A class="" title="Crosspost from ThinqLinq.com" href="http://thinqlinq.com/Default/Projecting-into-an-unmapped-property-from-a-LINQ-to-SQL-query.aspx"&gt;ThinqLinq.com&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=3217" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/286435661" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/linq+VB/default.aspx">linq VB</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/05/08/projecting-an-unmapped-property-into-an-anonymous-type-with-linq-to-sql.aspx</feedburner:origLink></item><item><title>Geek Speak resources for the LINQ Migration Strategies talk</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/263025743/geek-speak-resources-for-the-linq-migration-strategies-talk.aspx</link><pubDate>Thu, 03 Apr 2008 01:44:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:2996</guid><dc:creator>jwooley</dc:creator><slash:comments>1</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/2996.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=2996</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=2996</wfw:comment><description>&lt;DIV class=story&gt;
&lt;P class=EC_MsoNormal&gt;I had a blast on the Geek Speak today. If you missed it, they will have it available on demand from their blog at &lt;A href="http://blogs.msdn.com/geekspeak/"&gt;&lt;FONT color=#ff0000&gt;http://blogs.msdn.com/geekspeak/&lt;/FONT&gt;&lt;/A&gt;. You can even subscribe to the audio feed using your the Zune podcasting functionality from their &lt;A href="http://channel9.msdn.com/rss.aspx?ShowID=27"&gt;&lt;FONT color=#ff0000&gt;rss feed&lt;/FONT&gt;&lt;/A&gt;. One of the things I love about these events is the variety of the questions that attendees bring.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;As I mentioned, the slide deck I used for the session is available in the &lt;A href="http://thinqlinq.com/Files.aspx"&gt;&lt;FONT color=#ff0000&gt;Files&lt;/FONT&gt;&lt;/A&gt; section here as &lt;A href="http://thinqlinq.com/Downloads/LINQMigrationStrategies.zip"&gt;&lt;FONT color=#ff0000&gt;Linq Migration Strategies&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Below are some of the questions that came up and some links to back up my answer for your reading edification.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: How&amp;nbsp;do you&amp;nbsp;import schema into VB at the top of the file, if schema is in project it will give you intellisense?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Beth Massi and Avner Aharoni demonstrate this in the webcast available at &lt;A href="http://blogs.msdn.com/bethmassi/archive/2008/01/18/channel-9-interview-xml-properties-and-enabling-intellisense.aspx"&gt;&lt;FONT color=#0068cf&gt;http://blogs.msdn.com/bethmassi/archive/2008/01/18/channel-9-interview-xml-properties-and-enabling-intellisense.aspx&lt;/FONT&gt;&lt;/A&gt;. They also demonstrate generating the schema from a sample XML document.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: How would you replace an existing data layer with LINQ to SQL?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;I started showing how to take the Personal Web Starter Kit and begin to LINQ enable it. The completed project is&amp;nbsp;available at &lt;A href="http://code.msdn.microsoft.com/LinqPersonalWeb"&gt;&lt;FONT color=#0068cf&gt;http://code.msdn.microsoft.com/LinqPersonalWeb&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: How does LINQ perform as compared to the other alternatives?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Any time you add a level of indirection there will be some performance penalty. With LINQ to Objects, they basically leverage the iterator pattern the same way the C# 2.0 Yield method works. For LINQ to SQL,&amp;nbsp;the best&amp;nbsp;series on performance is from Rico Mariani starting with&amp;nbsp;&lt;A href="http://blogs.msdn.com/ricom/archive/2007/06/22/dlinq-linq-to-sql-performance-part-1.aspx"&gt;&lt;FONT color=#0068cf&gt;http://blogs.msdn.com/ricom/archive/2007/06/22/dlinq-linq-to-sql-performance-part-1.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: Where can we find patterns and practices guidance on LINQ&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;This post is more along the lines of the Framework Design Guidelines book, but it is good information anyway: &lt;A href="http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx"&gt;&lt;FONT color=#0068cf&gt;http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;FONT color=#0068cf&gt;
&lt;P class=EC_MsoNormal&gt;There is also a Live from Redmond VB9 webcast discussing best practices at &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032337466" target=_blank&gt;&lt;FONT color=#0068cf&gt;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032337466&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Additional "How do I" videos are available at &amp;nbsp;&lt;A href="http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx"&gt;&lt;FONT color=#0068cf&gt;http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: What advice do you have for passing data&amp;nbsp;across tiers? If we&amp;nbsp;can’t pass context across tiers, can we pass resultant objects?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;There isn't really&amp;nbsp;a single difinitive post on this one. Searching for "DataContext" and "Short lived" or "Unit of work"&amp;nbsp;should supply a number of examples, including the following:&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/system.data.linq.datacontext.aspx"&gt;&lt;FONT color=#0068cf&gt;http://msdn2.microsoft.com/en-us/library/system.data.linq.datacontext.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;This forum post includes responses by Keith Farmer and Matt Warren who were both intimately involved with creating LINQ to SQL: &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2485909&amp;amp;SiteID=1"&gt;&lt;FONT color=#0068cf&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2485909&amp;amp;SiteID=1&lt;/FONT&gt;&lt;/A&gt;. Matt states, "&lt;FONT face=Arial&gt;You'll most often want a new context for every interesting unit of work.&amp;nbsp; DataContext's should be short lived if they can be. The only scenario where you'd keep a DataContext around for a long time would be if you were bulding the equivalent of a 2-tier UI based data-entry/editting appliction."&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Dino Esposito notes: &lt;A href="http://weblogs.asp.net/despos/archive/2008/03/19/more-on-datacontext-in-hopefully-a-realistic-world.aspx"&gt;&lt;FONT color=#0068cf&gt;http://weblogs.asp.net/despos/archive/2008/03/19/more-on-datacontext-in-hopefully-a-realistic-world.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Some additional resources mentioned:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Rick Strahl: &lt;A href="http://www.west-wind.com/weblog/default.aspx"&gt;&lt;FONT color=#0068cf&gt;http://www.west-wind.com/weblog/default.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Beth Massi: &lt;A href="http://blogs.msdn.com/bethmassi/"&gt;&lt;FONT color=#0068cf&gt;http://blogs.msdn.com/bethmassi/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;FONT color=#0068cf&gt;&lt;FONT color=#000000&gt;MSDN LINQ forum:&lt;/FONT&gt; &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=123&amp;amp;SiteID=1"&gt;&lt;FONT color=#ff0000&gt;http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=123&amp;amp;SiteID=1&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;&lt;STRONG&gt;Q: Regarding&amp;nbsp;Linq to Entities,&amp;nbsp;I hear that&amp;nbsp;the entities&amp;nbsp;will not use the same change tracking model to permit emitting across tiers, by making the EntitySets serializable and have the changes tracked on a set by set basis, can you confirm deny? Info on this?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;I don't know enough to comment on this. I would recommend asking the question on the ADO.NET Entity Framework forum at &lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=533&amp;amp;SiteID=1"&gt;&lt;FONT color=#0068cf&gt;http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=533&amp;amp;SiteID=1&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P class=EC_MsoNormal&gt;Crossposted from &lt;A class="" title="Thinq Linq geek speak resources" href="http://thinqlinq.com/Default/Geek-Speak-resources-for-the-LINQ-Migration-session.aspx"&gt;ThinqLinq.com&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=2996" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/263025743" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ+VB+C_2300_/default.aspx">LINQ VB C#</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/04/02/geek-speak-resources-for-the-linq-migration-strategies-talk.aspx</feedburner:origLink></item><item><title>GeekSpeak discusses LINQ Migration Strategies</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/261914705/geekspeak-discusses-linq-migration-strategies.aspx</link><pubDate>Tue, 01 Apr 2008 11:45:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:2979</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/2979.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=2979</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=2979</wfw:comment><description>&lt;P&gt;Tomorrow, Wednesday&amp;nbsp;4/2/2008, I will be the guest speaker on the Geek Speak webcast. We will be discussing strategies for beginning to incorporate LINQ into your existing&amp;nbsp;application infrastructure. In many cases, that does not mean replacing your entire data stack, but rather using pieces of LINQ to add functionality and in new&amp;nbsp;components. Please join us. The Geek Speak webcasts are often driven by&amp;nbsp;attendee questions. The more questions, the better the event.&lt;/P&gt;
&lt;DIV&gt;When: Wednesday, April 02, 2008 12:00 -1:00 PM (GMT-08:00) Pacific Time (US &amp;amp; Canada) or 3:00 - 4:00 PM Eastern Time.&lt;/DIV&gt;
&lt;DIV&gt;Where: Live Meeting &lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Registration URL:&lt;/B&gt; &lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032374380&amp;amp;Culture=en-US" target=_blank&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032374380&amp;amp;Culture=en-US&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Crossposted from &lt;A href="http://www.thinqlinq.com/"&gt;www.ThinqLinq.com&lt;/A&gt;. &lt;/DIV&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=2979" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/261914705" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ+Webcast/default.aspx">LINQ Webcast</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/04/01/geekspeak-discusses-linq-migration-strategies.aspx</feedburner:origLink></item><item><title>LINQ enabled Personal Web Starter Kit</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/250084443/linq-enabled-personal-web-starter-kit.aspx</link><pubDate>Wed, 12 Mar 2008 11:44:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:2797</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/2797.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=2797</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=2797</wfw:comment><description>&lt;P&gt;I love it when projects take a life of their own. A while back, I posted my &lt;A class="" title="LINQ with PWSK" href="http://www.thinqlinq.com/Default/Personal_Web_Starter_Kit_LINQed_up.aspx"&gt;LINQ enabled&amp;nbsp; Personal Web Starter Kit&lt;/A&gt; in VB and received several requests to provide a C# port. Thankfully, one brave soul stepped up and did the port for me. Thanks go to Stephen Murray for undertaking the challenge. As is often the case, one of the best ways to learn a technology is to use it. &lt;/P&gt;
&lt;P&gt;If you're interested in this sample, you can check out the project at the &lt;A href="http://code.msdn.microsoft.com/LinqPersonalWeb"&gt;MSDN code center&lt;/A&gt;. Specifically, you can access the &lt;A href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=LinqPersonalWeb&amp;amp;DownloadId=448"&gt;original VB version &lt;/A&gt;or &lt;A href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=LinqPersonalWeb&amp;amp;DownloadId=1165"&gt;Stephen's C# Port.&lt;/A&gt;&amp;nbsp;You can read more about this project on the &lt;A class="" title="LINQ enabled PWSK" href="http://www.thinqlinq.com/Default/Personal_Web_Starter_Kit_LINQed_up.aspx"&gt;Thinq Linq&lt;/A&gt; web site.&amp;nbsp;As always, let us know what you Thinq.&lt;/P&gt;&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=2797" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/250084443" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ+VB+C_2300_/default.aspx">LINQ VB C#</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/03/12/linq-enabled-personal-web-starter-kit.aspx</feedburner:origLink></item><item><title>LINQ in Action going to press</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/220250454/linq-in-action-going-to-press.aspx</link><pubDate>Mon, 21 Jan 2008 08:16:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:2288</guid><dc:creator>jwooley</dc:creator><slash:comments>1</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/2288.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=2288</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=2288</wfw:comment><description>&lt;P&gt;At long last, the process of doing my first book is coming to a close. I started this project last March. Through the process we had to revisit our work numerous times, including each time a new CTP or Beta drop came. For me, 10 months, and Fabrice 2 years later, we found out this week that the book is going to press.&lt;/P&gt;
&lt;P&gt;What does this mean for you, if you purchased the &lt;A href="http://www.manning.com/affiliate/idevaffiliate.php?id=263_74"&gt;eBook&lt;/A&gt;, the final version is available now. Additionally, the &lt;A href="http://linqinaction.net/files/folders/linqinaction/entry1952.aspx"&gt;samples are available online&lt;/A&gt;&amp;nbsp;in both C# and VB. We are also making three chapters available for free if you are considering the book, but not sure yet. &lt;/P&gt;
&lt;P&gt;If you purchase the hard copy from Manning, we understand that it should be in around the first of February. This should mean that it will be shipping from the online outlets, like &lt;A href="http://www.amazon.com/gp/product/1933988169?ie=UTF8&amp;amp;tag=woolswond-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1933988169"&gt;Amazon&lt;/A&gt; by the middle of February.&lt;/P&gt;
&lt;P&gt;I hope you find the book as rewarding to read as it did for us to write.&lt;/P&gt;
&lt;P&gt;crossposted from &lt;A href="http://www.thinqlinq.com"&gt;www.thinqlinq.com&lt;/A&gt; &lt;/P&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=2288" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/220250454" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ/default.aspx">LINQ</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/01/21/linq-in-action-going-to-press.aspx</feedburner:origLink></item><item><title>Annoucing ThinqLinq.com</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/214263379/annoucing-thinqlinq-com.aspx</link><pubDate>Thu, 10 Jan 2008 07:46:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:2184</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/2184.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=2184</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=2184</wfw:comment><description>&lt;P&gt;You may have seen me present it at a speaking engagement. You may have watched the &lt;A href="http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2007/06/28/asp-net-podcast-show-95-jim-wooley-on-linq-part-i-video-and-audio.aspx"&gt;podcasts&lt;/A&gt;. You may have even &lt;A href="http://www.thinqlinq.com/Downloads/ThinqLinqRtm.zip"&gt;downloaded the sample application&lt;/A&gt;. Now you can see it in action. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.thinqlinq.com"&gt;&lt;STRONG&gt;ThinqLinq.com&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; is now live.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The site was designed completely in VB with LINQ as the data access mechanism.&amp;nbsp;The base application was built in 2 hours from not knowing RSS to being able to import a RSS feed, displaying it on a form and producing a new feed from the imported data. The site is a testimate to the power of LINQ and the RAD capabilities that it brings.&amp;nbsp;Head on over to the site and check it out.&lt;/P&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=2184" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/214263379" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/VB+DevCenter/default.aspx">VB DevCenter</category><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/VB/default.aspx">VB</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2008/01/10/annoucing-thinqlinq-com.aspx</feedburner:origLink></item><item><title>More on VS 2008 breaking changes</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/195298059/more-on-vs-2008-breaking-changes.aspx</link><pubDate>Mon, 03 Dec 2007 00:49:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:1898</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/1898.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=1898</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=1898</wfw:comment><description>&lt;p&gt;In addition to the items I mentioned in my previous &lt;a href="http://devauthority.com/blogs/jwooley/archive/2007/11/20/101099.aspx"&gt;Beta 2 - RTM breaking change list&lt;/a&gt;, I found a link on the &lt;a href="http://msdn2.microsoft.com/en-us/bb330936.aspx"&gt;VS 2008 samples page&lt;/a&gt; that a &lt;a href="http://download.microsoft.com/download/d/7/e/d7eeb256-5789-411c-a367-c9fda05c2b1c/LINQ_to_SQL_Beta_2_to_RTM_Breaking_Changes.docx"&gt;whitepaper&lt;/a&gt; has been issued on this.&lt;/p&gt;
&lt;p&gt;In addition, there is a whitepaper specific to breaking changes between VB 2005 and VB 2008 available &lt;a href="http://download.microsoft.com/download/d/7/e/d7eeb256-5789-411c-a367-c9fda05c2b1c/Visual_Basic_and_CSharp_Breaking_Changes_from_Visual_Studio_2005_to_Visual_Studio_2008.docx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;font color="#6464b9" size="2"&gt;Technorati tags:&amp;nbsp;&lt;/font&gt;&lt;font color="#6464b9" size="3"&gt; &lt;/font&gt;&lt;a href="http://technorati.com/tag/vb" rel="tag"&gt;&lt;font size="3"&gt;&lt;font color="#6464b9"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=vb" alt=" "&gt;&lt;/font&gt;&lt;font color="#444433"&gt;VB&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#6464b9" size="2"&gt; &lt;/font&gt;&lt;a href="http://technorati.com/tag/visual+studio" rel="tag"&gt;&lt;font size="3"&gt;&lt;font color="#6464b9" size="2"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=visual+studio" alt=" "&gt;&lt;/font&gt;&lt;font color="#444433"&gt;Visual Studio&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#6464b9" size="2"&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=1898" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/195298059" height="1" width="1"/&gt;</description><category domain="http://linqinaction.net/blogs/jwooley/archive/tags/VB/default.aspx">VB</category><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2007/12/03/more-on-vs-2008-breaking-changes.aspx</feedburner:origLink></item><item><title>Projecting XML from LINQ to SQL</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/195298060/projecting-xml-from-linq-to-sql.aspx</link><pubDate>Tue, 20 Nov 2007 07:08:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:1788</guid><dc:creator>jwooley</dc:creator><slash:comments>1</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/1788.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=1788</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=1788</wfw:comment><description>&lt;p&gt;Among the new cool features in Visual Studio 2008, one of the best may be the XML Literal support with VB 9 and LINQ. In my &lt;a href="http://linqinaction.net/blogs/jwooley/archive/2007/11/20/101099.aspx"&gt;last post&lt;/a&gt;, I mentioned some changing features from the Beta to RTM. One that could easily be overlooked is a change to the way LINQ to SQL can now directly project into XML literals. &lt;/p&gt;

&lt;p&gt;Through the Beta cycle, there was an issue with projecting XML elements directly from a LINQ to SQL query. If you haven't seen LINQ to SQL with XML, here's a code sample that explains what I'm referring to:&lt;/p&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; dc &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; LinqBlogDataContext&lt;br&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;'Formulate the Query to get the last 10 blog posts&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; query = (&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;From&lt;/font&gt;&lt;font size="2"&gt; p &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;font size="2"&gt; dc.PostItems _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Order&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;By&lt;/font&gt;&lt;font size="2"&gt; p.PublicationDate &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Descending&lt;/font&gt;&lt;font size="2"&gt; _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Take&lt;/font&gt;&lt;font size="2"&gt; 10 _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Select&lt;/font&gt;&lt;font size="2"&gt; p).ToArray&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#008000" size="2"&gt;'Create a root Site node with 10 child "item" nodes. &lt;br&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;'Each node will be filled in through a LINQ query&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; fooShort = &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;site&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;From&lt;/font&gt;&lt;font size="2"&gt; p &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;font size="2"&gt; query _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Select&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;item&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;title&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Title &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;title&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;link&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;http://ThinqLinq.com/Default.aspx?Postid=&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Id &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;link&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;pubDate&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.PublicationDate &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;pubDate&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;guid&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#b96464" size="2"&gt;isPermaLink&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;=&lt;/font&gt;&lt;font color="#555555" size="2"&gt;"&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;false&lt;/font&gt;&lt;font color="#555555" size="2"&gt;"&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;42f563c8-34ea-4d01-bfe1-2047c2222a74:&amp;lt;%&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;p.Id &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;guid&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;description&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Description &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;description&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;item&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;site&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;In this code, I'm performing two queries. The first one sets up the LINQ to SQL query and pre-fetches the results into an Array. In the beta builds, if we didn't include the pre-fetching ToArray, the second query which&amp;nbsp;projects the results of the first into individual &amp;lt;item&amp;gt; nodes. What is the difference between these queries? The first query uses LINQ to SQL and projects results directly from the database. Because we pre-fetch the results into an array of objects, the resulting query only uses LINQ to Objects rather than the direct LINQ to SQL implementation.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;With the final RTM of Visual Studio, we no longer need to pre-fetch the results from the query. Instead, we can directly project our desired XML from the select statement without needing the intermediary step. Here is the revised code. Notice, we can now perform the same result with&amp;nbsp;a single LINQ query rather than two.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; fooNew = &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;site&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;From&lt;/font&gt;&lt;font size="2"&gt; p &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;font size="2"&gt; dc.PostItems _&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#6464b9"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;Order&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;By&lt;/font&gt;&lt;font size="2"&gt; p.PublicationDate &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Descending&lt;/font&gt;&lt;font size="2"&gt; _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Take&lt;/font&gt;&lt;font size="2"&gt; 10 _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Select&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;item&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;title&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Title &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;title&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;link&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;http://ThinqLinq.com/Default.aspx?Postid=&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Id &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;link&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;pubDate&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.PublicationDate &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;pubDate&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;guid&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#b96464" size="2"&gt;isPermaLink&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;=&lt;/font&gt;&lt;font color="#555555" size="2"&gt;"&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;false&lt;/font&gt;&lt;font color="#555555" size="2"&gt;"&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;42f563c8-34ea-4d01-bfe1-2047c2222a74:&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Id &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;guid&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#844646" size="2"&gt;description&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#555555" size="2"&gt;&amp;lt;%=&lt;/font&gt;&lt;font size="2"&gt; p.Description &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;description&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;item&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#555555" size="2"&gt;%&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#844646" size="2"&gt;site&lt;/font&gt;&lt;font color="#6464b9" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;The result is more concise. You may find you want to continue separating your query definition from your XML creation in order to improve maintainability. If this is the case, simply keep the first code sample and remove the call to .ToArray. Because LINQ to SQL is composable, you can separate the queries into two code sets. When the query is evaluated, the two expressions will be combined into a single query to the database and the projection will continue to work.&lt;/p&gt;

&lt;p&gt;Enjoy working with VB 9 and XML. In my opinion it is one of the killer features of Visual Studio 2008. If you give it a try, I think you might find the same.&lt;/p&gt;

&lt;p&gt;&lt;font color="#6464b9" size="2"&gt;Technorati tags: &lt;a href="http://technorati.com/tag/linq" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=linq" alt=" "&gt;&lt;font color="#444433"&gt;linq&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;, &lt;/font&gt;&lt;a href="http://technorati.com/tag/vb" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=vb" alt=" "&gt;&lt;font color="#444433"&gt;VB&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;a href="http://technorati.com/tag/visual+studio" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=visual+studio" alt=" "&gt;&lt;font color="#444433"&gt;Visual Studio&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;a href="http://technorati.com/tag/xml" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=xml" alt=" "&gt;&lt;font color="#444433"&gt;XML&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=1788" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/195298060" height="1" width="1"/&gt;</description><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2007/11/20/projecting-xml-from-linq-to-sql.aspx</feedburner:origLink></item><item><title>Visual Studio 2008 (Orcas) Changes from Beta 2 to RTM</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/195298061/visual-studio-2008-orcas-changes-from-beta-2-to-rtm.aspx</link><pubDate>Tue, 20 Nov 2007 06:53:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:1787</guid><dc:creator>jwooley</dc:creator><slash:comments>2</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/1787.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=1787</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=1787</wfw:comment><description>&lt;p&gt;I've just updated the ThinqLinq proof of concept site for the Visual Studio 2008 release that came out today. If you're following the sample application, or are looking for a sample VB 9 implementation of LINQ in a web site, check out the download at &lt;a href="http://devauthority/files/13/jwooley/entry101097.aspx"&gt;http://devauthority.com/files/13/jwooley/entry101097.aspx&lt;/a&gt;. In case you are interested, here are the changes that were necessary to move from Beta 2 to the RTM. (The first two items are repeats from my &lt;a href="http://linqinaction.net/blogs/jwooley/archive/2007/11/19/vs-2008-rtm-and-the-net-framework-3-5-shipped.aspx"&gt;post earlier today&lt;/a&gt;).&lt;/p&gt;
&lt;li&gt;Open&amp;nbsp;the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format. 
&lt;/li&gt;&lt;li&gt;Replace the Add methods with InsertOnSubmit. Likewise, change Remove to DeleteOnSubmit. You may be able to do a global search and replace on this, but be careful not to make changes to any IList object implementations, only LINQ to SQL ones.&lt;/li&gt;
&lt;li&gt;SyndicationFeed.Load removed the option to pass in a URI. Instead, I used SyndicationFeed.Load(New System.Xml.XmlTextReader(UrlString)).&lt;/li&gt;
&lt;li&gt;The SyndicationFeed's Item PublishDate property is changed to the new DateTimeOffset type rather than the simpler DateTime. As a result, get the date from the PublishDate.Date property.&lt;/li&gt;
&lt;li&gt;When projecting XML elements as part of a LINQ to SQL query, you no longer need to pre-fetch the results into an array. I'll make a&amp;nbsp;separate post on this item.&lt;/li&gt;
&lt;p&gt;That's all I've found so far. I've already updated both the ThinqLinq site and the&amp;nbsp;samples for&amp;nbsp;the upcoming &lt;a href="http://www.linqinaction.net"&gt;LINQ in Action&lt;/a&gt; book.&amp;nbsp;I'm sure I've missed something, but so far, the upgrade is relatively easy this time around. The IDE does appear to be running faster as well.&lt;/p&gt;
&lt;p&gt;Technorati tags: &lt;a href="http://technorati.com/tag/linq" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=linq" alt=" "&gt;&lt;font color="#444433"&gt;linq&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;, &lt;/font&gt;&lt;a href="http://technorati.com/tag/orcas" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=orcas" alt=" "&gt;&lt;font color="#444433"&gt;orcas&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;a href="http://technorati.com/tag/visual+studio" rel="tag"&gt;&lt;font size="3"&gt;&lt;img src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=visual+studio" alt=" "&gt;&lt;font color="#444433"&gt;Visual Studio&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=1787" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/195298061" height="1" width="1"/&gt;</description><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2007/11/20/visual-studio-2008-orcas-changes-from-beta-2-to-rtm.aspx</feedburner:origLink></item><item><title>VS 2008 RTM and the .NET Framework 3.5 Shipped</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/195298062/vs-2008-rtm-and-the-net-framework-3-5-shipped.aspx</link><pubDate>Mon, 19 Nov 2007 19:09:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:1784</guid><dc:creator>jwooley</dc:creator><slash:comments>1</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/1784.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=1784</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=1784</wfw:comment><description>&lt;P&gt;It's offical, &lt;A href="http://blogs.msdn.com/somasegar/archive/2007/11/19/visual-studio-2008-and-net-framework-3-5-shipped.aspx"&gt;Soma annouced on his blog&lt;/A&gt; that the 3.5 .Net Framework along with Visual Studio 2008 have shipped. I have been excited by the things coming with this release since PDC 2005 and am glad to finally work the the official bits. I am aware of a couple breaking changes between the Beta 2 and RTM, and will try to keep you updated as I find more items.&lt;/P&gt;
&lt;P&gt;The biggest changes to be aware of in regards to LINQ to SQL are the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open&amp;nbsp;the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format.&lt;/LI&gt;
&lt;LI&gt;Replace the Add methods with InsertOnSubmit. Likewise, change Remove to DeleteOnSubmit. You may be able to do a global search and replace on this, but be careful not to make changes to any IList object implementations, only LINQ to SQL ones.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;There are a couple other minor updates that may catch you off-guard. I'll update you once I've had a chance to play with the final bits.&lt;/P&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=1784" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/195298062" height="1" width="1"/&gt;</description><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2007/11/19/vs-2008-rtm-and-the-net-framework-3-5-shipped.aspx</feedburner:origLink></item><item><title>Feedburner access to Wooley's various Wonderings</title><link>http://feeds.feedburner.com/~r/WooleysLinqWonderings/~3/195298063/feedburner-access-to-wooley-s-various-wonderings.aspx</link><pubDate>Fri, 09 Nov 2007 23:24:00 GMT</pubDate><guid isPermaLink="false">474e9fbe-b00d-4298-b93d-72ccda50e72d:1725</guid><dc:creator>jwooley</dc:creator><slash:comments>0</slash:comments><comments>http://linqinaction.net/blogs/jwooley/comments/1725.aspx</comments><wfw:commentRss>http://linqinaction.net/blogs/jwooley/commentrss.aspx?PostID=1725</wfw:commentRss><wfw:comment>http://linqinaction.net/blogs/jwooley/rsscomments.aspx?PostID=1725</wfw:comment><description>&lt;P&gt;I have set-up several feedburner syndication options for my postings for your enjoyment. Feel free to move your aggregator over to those versions of the feeds and show me how much you digg what I have to say. Here's the links for you:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://feeds.feedburner.com/wooleyswonderings"&gt;Wooley's Wonderings&lt;/A&gt;: My main feed&lt;BR&gt;&lt;A href="http://feeds.feedburner.com/JimsSamplesAndPresentations"&gt;Jim's Samples and Presentations&lt;/A&gt;: My downloads and sample applications from my presentations. Subscribe here to get updates whenever I add new samples.&lt;/P&gt;
&lt;P&gt;I have a bunch of things I want to discuss from my DevConnections trip, so stay tuned.&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
Crossposted from http://devauthority.com/blogs/jwooley/default.aspx&lt;img src="http://linqinaction.net/aggbug.aspx?PostID=1725" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/WooleysLinqWonderings/~4/195298063" height="1" width="1"/&gt;</description><feedburner:origLink>http://linqinaction.net/blogs/jwooley/archive/2007/11/09/feedburner-access-to-wooley-s-various-wonderings.aspx</feedburner:origLink></item></channel></rss>
