<?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:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Thinq Linq</title>
    <link>http://www.ThinqLinq.com/default.aspx</link>
    <description>Thoughts relating to LINQ and Language Integrated Query related topics.</description>
    <dc:language>en-US</dc:language>
    <generator>LINQ</generator>
    <geo:lat>33.99605</geo:lat><geo:long>-84.474649</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/thinqlinq/rss" type="application/rss+xml" /><feedburner:emailServiceId>1541017</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><item>
      <title>Filling an object from a DataReader with LINQ using DataContext.Translate</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/345735987/Default.aspx</link>
      <pubDate>Fri, 25 Jul 2008 09:49:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22010</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22010</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22010</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22010</wfw:comment>
      <description>&lt;P&gt;One of the key things that LINQ to SQL does for us is offers a quick way to fill a set of objects with data from a database. Typically this is done by setting up some mapping and calling the GetTable method on the DataContext. There are cases, particularly when you already have an infrastructure set-up to populate objects using a DbDataReader, where it would be nice if you could just populate the columns without the need to set-up a mapping.&lt;/P&gt;
&lt;P&gt;The DataContext has a little known method called Translate which can take a DBDataReader as a parameter and fill an IEnumerable list of objects without the need for mapping structures. To use it, specify the type you want to populate and pass the instance of the reader and let it do it's magic. Here's a sample:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Using&lt;/FONT&gt; cn A&lt;FONT color=#0000ff&gt;s&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; SqlClient.SqlConnection(&lt;FONT color=#0000ff&gt;My&lt;/FONT&gt;.Settings.NorthwindConnectionString)&lt;BR&gt;&amp;nbsp; cn.Open()&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;Using&lt;/FONT&gt; cmd &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; SqlClient.SqlCommand(&lt;FONT color=#a31515&gt;"SELECT * FROM Region"&lt;/FONT&gt;, cn)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; reader = cmd.ExecuteReader()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Using&lt;/FONT&gt; nwind &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; NorthwindDataContext&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; RegionList = nwind.Translate(&lt;FONT color=#0000ff&gt;Of&lt;/FONT&gt; Region)(reader)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;For&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Each&lt;/FONT&gt; item &lt;FONT color=#0000ff&gt;In&lt;/FONT&gt; RegionList&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&lt;FONT color=#a31515&gt;" {0}: {1}"&lt;/FONT&gt;, item.RegionId, item.RegionDescription)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Next&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Using&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Using&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Using&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000 size=3&gt;In this case, we tell the context to translate the resultset of the&amp;nbsp;reader into a generic IEnumerable(Of Region). There are number of caveats to keep in mind here:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#000000 size=3&gt;The column name in the result set must correspond to the property name.The translation is quite forgiving however. It is not case sensitive.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;If you have a row in the result set but no corresponding property, that row will be ignored (no exception will be thrown). 
&lt;LI&gt;If you have a property in your object with no corresponding row in the result set, that property's value will not be set. 
&lt;LI&gt;The translation must be done to a known type. You can not project into an anonymous type. You can return an object or simple IEnumerable if the type is not known and then use reflection to work with the results. 
&lt;LI&gt;Since the translate method returns an IEnumerable, make sure not to close the connection or the reader before iterating over the results.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The Translate method supports 3 overloads as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#1000a0&gt;Public&lt;/FONT&gt; &lt;FONT color=#1000a0&gt;Function&lt;/FONT&gt;Translate(&lt;FONT color=#1000a0&gt;Of&lt;/FONT&gt; &lt;B&gt;TResult&lt;/B&gt;)(&lt;FONT color=#1000a0&gt;ByVal&lt;/FONT&gt; &lt;B&gt;reader&lt;/B&gt;&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;DbDataReader)&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;IEnumerable(&lt;FONT color=#1000a0&gt;Of&lt;/FONT&gt; TResult)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#1000a0&gt;Public&lt;/FONT&gt; &lt;FONT color=#1000a0&gt;Function&lt;/FONT&gt; &lt;B&gt;Translate&lt;/B&gt;(&lt;FONT color=#1000a0&gt;ByVal&lt;/FONT&gt; &lt;B&gt;reader&lt;/B&gt;&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;DbDataReader)&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;IMultipleResults&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#1000a0&gt;Public&lt;/FONT&gt; &lt;FONT color=#1000a0&gt;Function&lt;/FONT&gt; &lt;B&gt;Translate&lt;/B&gt;(&lt;FONT color=#1000a0&gt;ByVal&lt;/FONT&gt; &lt;B&gt;elementType&lt;/B&gt;&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;Type, &lt;FONT color=#1000a0&gt;ByVal&lt;/FONT&gt; &lt;B&gt;reader&lt;/B&gt;&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;DbDataReader)&lt;FONT color=#1000a0&gt; As &lt;/FONT&gt;IEnumerable&lt;/P&gt;
&lt;P&gt;Translate does not require any mappings to be set. It simply sets the public property values based on the column names. If you have business logic in your Property Set implementations, that logic will run. As far as I can see, there is no way to instruct Translate to use the private storage field instead of the public property.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=uUm5rJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=uUm5rJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=a8a03J"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=a8a03J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=dF3Bqj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=dF3Bqj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=E4dcZJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=E4dcZJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=KiBHqJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=KiBHqJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=IRWu8j"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=IRWu8j" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=0UhNUj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=0UhNUj" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/345735987" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22010</feedburner:origLink></item>
    <item>
      <title>Chris Williams' Nine questions</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/345668775/Default.aspx</link>
      <pubDate>Fri, 25 Jul 2008 08:33:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22009</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22009</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22009</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22009</wfw:comment>
      <description>&lt;P&gt;I had the honor of participating in Chris Williams "&lt;A href="http://geekswithblogs.net/cwilliams/archive/2008/07/25/124017.aspx"&gt;Nine Questions&lt;/A&gt;" project. If you are interested in getting to knowing a bit more about me other than just how I thinq, &lt;A href="http://geekswithblogs.net/cwilliams/archive/2008/07/25/124017.aspx"&gt;check it out&lt;/A&gt; on his blog.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=zucxaJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=zucxaJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=7iTCsJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=7iTCsJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=COW4Qj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=COW4Qj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=NaN1sJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=NaN1sJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=YLBsdJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=YLBsdJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=jRT6yj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=jRT6yj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Q1ih8j"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Q1ih8j" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/345668775" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22009</feedburner:origLink></item>
    <item>
      <title>ThinqLinq in multiple languages</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/339276149/Default.aspx</link>
      <pubDate>Fri, 18 Jul 2008 14:15:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22008</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22008</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22008</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22008</wfw:comment>
      <description>&lt;P&gt;Former Atlanta luminary, &lt;A href="http://blogs.msdn.com/kaevans/default.aspx"&gt;Kirk Allen Evans&lt;/A&gt; &lt;A href="http://blogs.msdn.com/kaevans/archive/2008/07/16/made-my-blog-go-live.aspx"&gt;reminded me&lt;/A&gt; about the &lt;A href="http://www.windowslivetranslator.com/Default.aspx"&gt;Windows Live translator service&lt;/A&gt; that I tried unsucessfully to add to this site a couple months ago. I was able to get it to work this time based on the code he posted. All you need to do is add the following to your site and the magic translator will be added with no extra work for you:&lt;/P&gt;
&lt;P&gt;&amp;lt;!-- Translator --&amp;gt;&lt;BR&gt;&amp;lt;div id=&lt;SPAN&gt;"translator"&lt;/SPAN&gt;&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;div id=&lt;SPAN&gt;"trans"&lt;/SPAN&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&lt;SPAN&gt;"text/javascript"&lt;/SPAN&gt; src=&lt;SPAN&gt;"http://translator.live.com/TranslatePageLink.aspx?pl=en"&lt;/SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;BR&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;
&lt;P&gt;I did take the liberty of correcting the code to make it XHtml complant by adding the end slash on the br tags. You can try it out by selecting the drop down list on the right hand site of this site that says "Translator", selecting the language you want and clicking the -&amp;gt; button. &lt;/P&gt;
&lt;P&gt;As always, let me know what you Thinq.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=QMIx4J"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=QMIx4J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=eGKKvJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=eGKKvJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=6rSRYj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=6rSRYj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=StJjSJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=StJjSJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=FA52rJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=FA52rJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=CeDYjj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=CeDYjj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=ulzpzj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=ulzpzj" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/339276149" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22008</feedburner:origLink></item>
    <item>
      <title>Geek Speak podcasts are back</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/263026531/Default.aspx</link>
      <pubDate>Fri, 18 Jul 2008 14:07:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21995</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21995</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21995</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21995</wfw:comment>
      <description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/geekspeak/archive/2008/07/18/geekspeak-podcasts-from-march-april-and-june-now-available.aspx"&gt;Glenn just announced&lt;/A&gt; that the Geek Speak podcasts are available again. They were disabled right before &lt;A href="/Default/Geek-Speak-resources-for-the-LINQ-Migration-session.aspx"&gt;my session&lt;/A&gt; on &lt;A href="http://download.microsoft.com/download/3/2/2/32228ca5-82ee-4857-bcf0-5612c621f391/1032374380.wma"&gt;LINQ Migration Strategies&lt;/A&gt; came out. If you have a Zune or IPod and want to &lt;A href="http://www.microsoft.com/seminar/en/BMO-PODCAST/MSDN_Geek_Speak_WMA.xml"&gt;subscribe to the feed&lt;/A&gt;, it is available again.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=T75r6I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=T75r6I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Qm67SI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Qm67SI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Hzsy0i"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Hzsy0i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=qroK9I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=qroK9I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=ZFcTOI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=ZFcTOI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Mi286i"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Mi286i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=VMM5Oi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=VMM5Oi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/263026531" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21995</feedburner:origLink></item>
    <item>
      <title>LINQ to SQL on MSDN</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/339238638/Default.aspx</link>
      <pubDate>Fri, 18 Jul 2008 13:35:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22007</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22007</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22007</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22007</wfw:comment>
      <description>&lt;P&gt;While I was away on vacation, Wriju posted a good list of MSDN documents he calls the "&lt;A href="http://blogs.msdn.com/wriju/archive/2008/07/03/linq-to-sql-missing-manual-are-at-msdn.aspx"&gt;LINQ to SQL Missing Manual&lt;/A&gt;". It is a good list and addresses a number of items people regularly ask about concerning LINQ. Perhaps the most important ones are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb882646.aspx"&gt;Customizing Insert, Update, and Delete Operations (LINQ to SQL)&lt;/A&gt;&lt;BR&gt;Describes how to add validation code and other customizations.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb546187.aspx"&gt;Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL)&lt;/A&gt; &lt;BR&gt;Provides detailed information for multi-tier applications that use LINQ to SQL.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb399376.aspx"&gt;Object Identity (LINQ to SQL)&lt;/A&gt; &lt;BR&gt;Describes object identity in the LINQ to SQL object model, and explains how this feature differs from object identity in a database. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;There are a bunch of other topics over there. If you are using LINQ to SQL, you should definately check it out.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Z3saDJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Z3saDJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Z5sCbJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Z5sCbJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=JL7D1j"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=JL7D1j" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=682O2J"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=682O2J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=xU945J"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=xU945J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=MPE3fj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=MPE3fj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=gOrBTj"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=gOrBTj" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/339238638" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId6">VS 2008</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22007</feedburner:origLink></item>
    <item>
      <title>Fetching child records using Stored Procedures with LINQ to SQL</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/318097498/Default.aspx</link>
      <pubDate>Mon, 23 Jun 2008 08:14:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22006</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22006</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22006</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22006</wfw:comment>
      <description>&lt;P&gt;&lt;SPAN&gt;You can consume stored procs rather than the standard dynamic sql for accessing child objects. To do this, set up your fetch stored procs and make sure that they return the correct data type (not the standard custom generated type for stored procedures). To load a child collection, create a method on the partial implementation of your context. Name the function "LoadCs" where "C" is the name of the child property accessor from the parent object in the designer. This function will take a type as the parent type as a parameter and return an IEnumerable of the Child type. The names you use must agree with the names of the types and properties in your entities in order for this to work.&lt;/P&gt;
&lt;P align=left&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public&lt;/SPAN&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;CustomDataContext&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=codeseg&gt;
&lt;DIV class=codecontent&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #00b050; FONT-FAMILY: Consolas; language: en-US"&gt;‘Load a child collection&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Public&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Function&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;LoadCs&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;ByVal&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; parent &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;As&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; T)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;As&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;IEnumerable&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Of&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; C)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Return&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Me&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;.LoadCs&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;(parent.ID)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;End&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Function&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;End&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;/SPAN&gt;The process to load a single child is similar. In this case, the function needs to be the singularized version of your entity and the return type will be the actual entity type rather than an IEnumerable as follows:&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P align=left&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN style="COLOR: #00b050; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;FONT face="Times New Roman"&gt;‘Load a single child&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class=codeseg&gt;
&lt;DIV class=codecontent&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Public&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Function&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;LoadC&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;ByVal&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; parent &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;As&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; P) &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;As&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; C&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Return&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Me&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;.LoadC&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;parent.CId&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;).&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;SingleOrDefault&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN-TOP: 4pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 0.4in; WORD-BREAK: normal; DIRECTION: ltr; TEXT-INDENT: -0.28in; unicode-bidi: embed; TEXT-ALIGN: left; language: en-US; punctuation-wrap: hanging" align=left&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;End&lt;/SPAN&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: Consolas; language: en-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: Consolas; language: en-US"&gt;Function&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;/FONT&gt;Using these methods causes the context to lazy load the child objects. The default change tracking implementation will continue to work and if you have replaced the runtime behavior for the CUD operations with stored procedure implementations, they will be used just as if you fetched the objects through LINQ generated dynamic SQL.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=QZgjUI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=QZgjUI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=FLHK8I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=FLHK8I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=a5DBFi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=a5DBFi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=3ecWtI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=3ecWtI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=qCxsKI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=qCxsKI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Wk6Efi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Wk6Efi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Cw6cPi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Cw6cPi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/318097498" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22006</feedburner:origLink></item>
    <item>
      <title>Manning .Net Daily Drawing promotion</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/317160219/Default.aspx</link>
      <pubDate>Wed, 18 Jun 2008 21:10:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22005</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22005</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22005</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22005</wfw:comment>
      <description>&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;If you haven't purchased LINQ in Action yet, or like it so much that you want to check out other Manning books, make sure to check out their new promotion starting Thursday, June 19, 2008. Here's the details if you are interested.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=+0&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt;The “.NET Daily Drawing” starts June 19&lt;BR&gt;&lt;/STRONG&gt;This promotion will run for one month, from June 19 - July 17. Each day’s lucky winner can choose one free .NET ebook of their choice. And finally, on the last day of the drawing, we're awarding one lucky winner... &lt;B&gt;the entire Manning .NET library! (&lt;/B&gt;That’s nearly a $3000 value...)&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 12px"&gt;&lt;FONT face="Arial Italic"&gt;&lt;STRONG&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;To participate, Click the button below and fill in the form.&lt;BR&gt;&lt;A href="http://www.manning.com/affiliate/idevaffiliate.php?id=1024_123"&gt;&lt;IMG alt="Book a day" src="http://www.ThinqLinq.com/Images/LINQ_banner2.gif"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=WEEPZI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=WEEPZI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=v0nOYI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=v0nOYI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=a3obDi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=a3obDi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=QhuOTI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=QhuOTI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=QeHpkI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=QeHpkI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=jFqU2i"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=jFqU2i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=g0pUdi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=g0pUdi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/317160219" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22005</feedburner:origLink></item>
    <item>
      <title>LINQ is not about working with databases</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/311193898/Default.aspx</link>
      <pubDate>Fri, 13 Jun 2008 09:18:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22004</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22004</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22004</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22004</wfw:comment>
      <description>&lt;P&gt;I don't know how many people I've talked to&amp;nbsp;about LINQ concerned that it requires direct table access. Ok people, repeat after me:&lt;/P&gt;
&lt;P align=center&gt;&lt;STRONG&gt;&lt;FONT size=5&gt;LINQ is NOT about working with databases.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P align=left&gt;LINQ is an abstraction layer for working with data which allows for set based operations, projections, filters, etc on anything that can be enumerated over. It just happens to have providers for working with relational data (LINQ to SQL, LINQ to Datasets, LINQ to Entities).&lt;/P&gt;
&lt;P align=left&gt;Oh, BTW. Each of these providers support using Stored Procedures in addition to direct table acces in case&amp;nbsp;you are interested.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=SmGf0I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=SmGf0I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=RoG7OI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=RoG7OI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=ZXobni"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=ZXobni" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=yLmQyI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=yLmQyI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=0KJDbI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=0KJDbI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=GCVKai"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=GCVKai" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=trOeui"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=trOeui" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/311193898" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22004</feedburner:origLink></item>
    <item>
      <title>Screen scraping and creating Word documents with LINQ to XML</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/310580678/Default.aspx</link>
      <pubDate>Thu, 12 Jun 2008 13:13:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22003</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>3</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22003</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22003</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22003</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 href="wlmailhtml:{E8645B44-A1AA-40C2-97FA-9B79234A9E04}mid://00000071/!x-usc:http://msdn.microsoft.com/en-us/events/teched/default.aspx"&gt;Developer Landing&lt;/A&gt; page, and the &lt;A href="wlmailhtml:{E8645B44-A1AA-40C2-97FA-9B79234A9E04}mid://00000071/!x-usc:http://msdn.microsoft.com/en-us/events/teched/cc676818.aspx"&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;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=70mjbI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=70mjbI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=XgaABI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=XgaABI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=XdN3Oi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=XdN3Oi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=WCbFRI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=WCbFRI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=tU9EoI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=tU9EoI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=auYWni"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=auYWni" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=LHcsmi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=LHcsmi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/310580678" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22003</feedburner:origLink></item>
    <item>
      <title>LINQ to SQL support for POCO</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/310090588/Default.aspx</link>
      <pubDate>Wed, 11 Jun 2008 21:24:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22002</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22002</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22002</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22002</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="/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;&lt;!--EndFragment--&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;!--EndFragment--&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;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=5J1X6I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=5J1X6I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=doumCI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=doumCI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=oJtPzi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=oJtPzi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=qAFJcI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=qAFJcI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=nmQNRI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=nmQNRI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=rsMXfi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=rsMXfi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=4L9kCi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=4L9kCi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/310090588" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId8">C#</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22002</feedburner:origLink></item>
    <item>
      <title>ThinqLinq at TechEd Developers 2008</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/303820897/Default.aspx</link>
      <pubDate>Tue, 03 Jun 2008 10:36:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22001</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>1</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22001</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22001</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22001</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;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=wC0K7I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=wC0K7I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=lQhEGI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=lQhEGI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=1u8LMi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=1u8LMi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=dGPmhI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=dGPmhI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=RK5F4I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=RK5F4I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=HFsjPi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=HFsjPi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=SiGGVi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=SiGGVi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/303820897" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22001</feedburner:origLink></item>
    <item>
      <title>Danny Simmons compares the Entity Framework to similar technologies</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/299503421/Default.aspx</link>
      <pubDate>Tue, 27 May 2008 21:23:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21999</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21999</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21999</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21999</wfw:comment>
      <description>&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;recent comparisons&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;building an IQueryable provider &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;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=w4YsJH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=w4YsJH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=OOE50H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=OOE50H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=XjjElh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=XjjElh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=3exIMH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=3exIMH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=eXLi8H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=eXLi8H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=uAxcBh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=uAxcBh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=7GPuDh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=7GPuDh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/299503421" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId6">VS 2008</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21999</feedburner:origLink></item>
    <item>
      <title>ThinqLinq at Teched Developers</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/299509783/Default.aspx</link>
      <pubDate>Tue, 27 May 2008 20:24:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:22000</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=22000</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=22000</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=22000</wfw:comment>
      <description>&lt;P&gt;If you're going to be at &lt;A href="https://www.msteched.com/dev/"&gt;TechEd Developer '08&lt;/A&gt;, make sure to say hi if you see me. I'll be hanging out in the VB area of the Technology Learning Center for some of the conference. In addition, I'll be one of the contestants in Speaker Idol and appreciate all of my peeps coming out to show your support.&lt;/P&gt;
&lt;P&gt;One of the other great things about this year's TechEd is the inclusion of a community lead weekend between TechEd Developer and TechEd IT. There are quite a number of different events, including a &lt;A href="http://www.devfish.net/articles/inbetween/"&gt;Tweener Weekend &lt;/A&gt;code camp put on by Dave Norderer and the South Florida guys. I'm honored to be speaking as part of this event&amp;nbsp;on some more advanced features that LINQ to SQL offers to developers beyond the basic drag and drop experience of the designer. &lt;/P&gt;
&lt;P&gt;I hope to see some of you at the event (or the various parties that come with these kinds of events.)&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=2vFF7H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=2vFF7H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=UwRTqH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=UwRTqH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Q0FMDh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Q0FMDh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=0ZJovH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=0ZJovH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=PQ03BH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=PQ03BH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=zK70Wh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=zK70Wh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=MywSMh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=MywSMh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/299509783" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId2">Code Camp</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=22000</feedburner:origLink></item>
    <item>
      <title>Anonymous Type property ordering in VB</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/291719727/Default.aspx</link>
      <pubDate>Fri, 16 May 2008 10:19:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21998</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>4</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21998</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21998</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21998</wfw:comment>
      <description>&lt;P&gt;Many people have noticed when binding an anonymous type to a grid in VB that the order of the properties does not reflect the order that they were specified in the projection (Select) clause. Instead, they appear alphabetized. Consider the following query:&lt;/P&gt;
&lt;P&gt;Dim query = From c In Customers _&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;Select c.LastName, c.FirstName, c.BirthDate&lt;/P&gt;
&lt;P&gt;If you bind this query to a DataGrid or DataGridView and allow the columns to be generated automatically, the results will be displayed with the following column ordering: BirthDate, FirstName, LastName. Notice that the columns are ordered alphabetically based on the property name.&lt;/P&gt;
&lt;P&gt;I just received word that this behavior is changing in the next update to VB. After this release, the property order should be retained from the projection clause, just as it is in C#.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=j56utH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=j56utH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=IG74AH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=IG74AH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Ph87Mh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Ph87Mh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=NciSPH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=NciSPH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=WuoxhH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=WuoxhH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=XYgw0h"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=XYgw0h" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=AhD05h"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=AhD05h" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/291719727" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId6">VS 2008</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21998</feedburner:origLink></item>
    <item>
      <title>VS 2008 SP1 beta</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/288842144/Default.aspx</link>
      <pubDate>Mon, 12 May 2008 12:15:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21997</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21997</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21997</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21997</wfw:comment>
      <description>&lt;P&gt;For those of you who are wanting to live on the bleeding edge, Microsoft has just released a beta for the Visual Studio 2008 Service Pack 1. Soma has a listing of some of the new features that are included in this release &lt;A href="http://blogs.msdn.com/somasegar/archive/2008/05/12/visual-studio-2008-and-net-fx-3-5-sp1-beta-available-now.aspx"&gt;on his blog&lt;/A&gt;. If you want to skip the description and jump straight to the bits, you should be able to &lt;A href="http://msdn.microsoft.com/vstudio/products/cc533447.aspx"&gt;download them here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;For LINQ fans, this release is important as it includes the nearly completed first release of the Entity Framework, ADO.Net Data Services (Astoria), and dynamic data controls. I'll likely start exploring those topics here in the near future, so go ahead and check them out if you haven't seen them before.&lt;/P&gt;
&lt;P&gt;This release also points to an important change from previous versions of .NET and Visual Studio in that people are often waiting for a service pack to justify moving to a new technology. This service pack appears to be is coming out much faster than previous versions, so hopefully it will only help to increase adoption. Note that this release is only a beta of the service pack. The final release is still pending at this point.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=EpfGnH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=EpfGnH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=fD3t7H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=fD3t7H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=c36k5h"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=c36k5h" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Ykq7xH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Ykq7xH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=QRmIHH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=QRmIHH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=YHv9Wh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=YHv9Wh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=V5y5Ph"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=V5y5Ph" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/288842144" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId6">VS 2008</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21997</feedburner:origLink></item>
    <item>
      <title>Projecting into an unmapped property from a LINQ to SQL query</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/286435190/Default.aspx</link>
      <pubDate>Thu, 08 May 2008 18:25:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21996</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21996</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21996</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21996</wfw:comment>
      <description>On page 216 of &lt;A href="http://www.LinqInAction.net"&gt;LINQ in Action&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;!--EndFragment--&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;!--EndFragment--&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;!--EndFragment--&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;!--EndFragment--&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;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=c0fmUH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=c0fmUH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=ZNzz2H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=ZNzz2H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=V8XaXh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=V8XaXh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=k1cefH"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=k1cefH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=N1gd2H"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=N1gd2H" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=DpETIh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=DpETIh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=1JoEsh"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=1JoEsh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/286435190" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21996</feedburner:origLink></item>
    <item>
      <title>Geek Speak discusses LINQ Migration Strategies</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/261923252/Default.aspx</link>
      <pubDate>Tue, 01 Apr 2008 06:35:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21994</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21994</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21994</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21994</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 class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=AIUlyI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=AIUlyI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=tsyDlI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=tsyDlI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=oh3e5i"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=oh3e5i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=ZSufhI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=ZSufhI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=nsZgFI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=nsZgFI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=nwwUji"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=nwwUji" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=Dh8Xmi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=Dh8Xmi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/261923252" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21994</feedburner:origLink></item>
    <item>
      <title>Joining composite keys with LINQ</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/253425100/Default.aspx</link>
      <pubDate>Tue, 18 Mar 2008 00:48:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21993</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>2</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21993</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21993</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21993</wfw:comment>
      <description>&lt;P&gt;LINQ makes working with data in its various guises easier. By intergating it into the language, we have rich integrated support for working with data. However, there are times where the syntax is slighly different from what you would typically expect with TSQL. Once case where this occurs is when trying to join two data sources that are related by more than one field (also know as a composite key). This differs from standard joins where one table has a primary key and the other table has a foreign key id.&amp;nbsp;Here's a sample table structure for a&amp;nbsp;standard join in Northwind between the Products and Categories:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.thinqlinq.com/images/ProductCategories.png"&gt;&lt;/P&gt;
&lt;P&gt;With Linq, this join could be represented with the following query:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; query = _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;From&lt;/FONT&gt; p &lt;FONT color=#0000ff&gt;In&lt;/FONT&gt; dc.Products _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Join&lt;/FONT&gt; c &lt;FONT color=#0000ff&gt;In&lt;/FONT&gt; dc.Categories _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;On&lt;/FONT&gt; p.CategoryID &lt;FONT color=#0000ff&gt;Equals&lt;/FONT&gt; c.CategoryID _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt; p.ProductName, c.CategoryName&lt;/P&gt;
&lt;P&gt;So far, there's not much new in this query. Here,&amp;nbsp;"p" is the outer variable and "c" is the inner variable of the join. Likewise, p.CategoryID is the outerKeySelector and c.CategoryID is the InnerKeySelector in the Join extension method.&lt;/P&gt;
&lt;P&gt;This works fine when we have single values that can be compared easily. However, how can we specify multiple fields for the KeySelectors on the join? In my work with&amp;nbsp;reverse mortgages, we have a situation&amp;nbsp;where the loan amount is based in part on the lending limits set forth by HUD. In their limits, they specify the State and County for each limit. In this case, I need to join those values against the loan property's state and county to come up with the limit amount. Let's consider the following partial table schemas.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.thinqlinq.com/images/CompositeKey.png"&gt;&lt;/P&gt;
&lt;P&gt;In this case, we could join the tables in TSQL with the following query:&lt;/P&gt;
&lt;P&gt;SELECT LendingLimits.Amount &lt;BR&gt;FROM LendingLimits &lt;BR&gt;INNER JOIN Property&lt;BR&gt;ON LendingLimits.State=Property.State AND&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LendingLimits.County=Property.County&lt;BR&gt;WHERE PropertyId=@SearchValue &amp;nbsp;AND&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EffectiveDate = @TargetDate&lt;/P&gt;
&lt;P&gt;Unfortunately, the Join extension method does not support the ability to provide the InnerKeySelector/OuterKeySelector as a series of expressions. However, when dealing with objects, we can compare objects to see if they equal each other. Therefore, the solution in this case is to join two anonymous types and compare them against each other. Here's the corresponding LINQ query. Notice the difference in the On clause. If you understand working with objects, this syntax should make sense.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; query1 = _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;From&lt;/FONT&gt; l &lt;FONT color=#0000ff&gt;In&lt;/FONT&gt; dc.LendingLimits _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Join&lt;/FONT&gt; p &lt;FONT color=#0000ff&gt;In&lt;/FONT&gt; dc.Properties _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;On New With&lt;/FONT&gt; {l.County, l.State} &lt;FONT color=#0000ff&gt;Equals&lt;/FONT&gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;New With&lt;/FONT&gt; {p.County, p.State} _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Where&lt;/FONT&gt; p.PropertyId = SearchValue &lt;FONT color=#0000ff&gt;And&lt;/FONT&gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l.EffectiveDate = TargetDate _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt; l.Amount&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=bvA0ZI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=bvA0ZI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=pxw84I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=pxw84I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=NcPWKi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=NcPWKi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=GWHQLI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=GWHQLI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=sTC1zI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=sTC1zI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=iVCkqi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=iVCkqi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=f4iHzi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=f4iHzi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/253425100" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21993</feedburner:origLink></item>
    <item>
      <title>LINQ enabled Personal Web Starter Kit in C#</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/248609675/Default.aspx</link>
      <pubDate>Sun, 09 Mar 2008 21:36:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21992</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>0</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21992</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21992</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21992</wfw:comment>
      <description>&lt;P&gt;I love it when projects take a life of their own. A while back, I posted my LINQ enabled&amp;nbsp; Personal Web Starter Kit 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;As always, let us know what you Thinq.&lt;/P&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=8mnoFI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=8mnoFI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=5O95pI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=5O95pI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=OEDULi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=OEDULi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=gQvqPI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=gQvqPI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=w0gNLI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=w0gNLI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=s88GBi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=s88GBi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=sUjCsi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=sUjCsi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/248609675" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId8">C#</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21992</feedburner:origLink></item>
    <item>
      <title>Querying the complete plays of Shakespeare using LINQ to XML</title>
      <link>http://feeds.feedburner.com/~r/thinqlinq/rss/~3/239687819/Default.aspx</link>
      <pubDate>Fri, 22 Feb 2008 17:46:00 GMT</pubDate>
      <guid isPermaLink="false">42f563c8-34ea-4d01-bfe1-2047c2222a74:21989</guid>
      <dc:creator>jwooley</dc:creator>
      <slash:comments>3</slash:comments>
      <comments>http://www.thinqlinq.com/Default.aspx?Postid=21989</comments>
      <wfw:commentRss>http://www.thinqlinq.com/CommentRss.aspx?PostId=21989</wfw:commentRss>
      <wfw:comment>http://www.thinqlinq.com/Default.aspx?Postid=21989</wfw:comment>
      <description>&lt;P&gt;I was working to come up with some creative uses of LINQ to XML for my new talk I'm giving at the &lt;A href="http://www.alabamacodecamp.com/"&gt;Huntsville, AL Code Camp&lt;/A&gt;. I figured it would be good to include a sample which queries a large XML document. Remembering that the complete works of Shakespeare were available in XML form, I did a quick search and found a version at &lt;A href="http://metalab.unc.edu/bosak/xml/eg/shaks200.zip"&gt;http://metalab.unc.edu/bosak/xml/eg/shaks200.zip&lt;/A&gt;. This file separates each play out into separate XML files. Since I wanted to find out which parts had the most lines across all plays, I wanted to put them into a single XML file. Rather than doing this manually, I went ahead and whipped up a quick LINQ query to fetch the xml documents and load them up into an array of XElements:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Dim plays = _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;From&lt;/FONT&gt;&lt;FONT size=+0&gt; file &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;In&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;FONT size=+0&gt; System.IO.DirectoryInfo(&lt;/FONT&gt;&lt;FONT color=#a31515&gt;"C:\projects\ShakespeareXml"&lt;/FONT&gt;&lt;FONT size=+0&gt;).GetFiles() _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Where&lt;/FONT&gt;&lt;FONT size=+0&gt; file.Extension.&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Equals&lt;/FONT&gt;&lt;FONT size=+0&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515&gt;".xml"&lt;/FONT&gt;&lt;FONT size=+0&gt;, StringComparison.CurrentCultureIgnoreCase) _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Let&lt;/FONT&gt;&lt;FONT size=+0&gt; doc = XElement.Load(file.FullName) _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt;&lt;FONT size=+0&gt; doc&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;Ok, now that out of the way, I really wanted to load up a single XML file with these resulting nodes. Pretty easy using XML Literals. Just wrap the query with a new root element:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=+0&gt;&lt;FONT size=+0&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt;&lt;FONT size=+0&gt; plays = _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;Plays&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#555555&gt;&amp;lt;%=&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;From&lt;/FONT&gt;&lt;FONT size=+0&gt; file &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;In&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;FONT size=+0&gt; System.IO.DirectoryInfo(&lt;/FONT&gt;&lt;FONT color=#a31515&gt;"C:\projects\ShakespeareXml"&lt;/FONT&gt;&lt;FONT size=+0&gt;).GetFiles() _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Where&lt;/FONT&gt;&lt;FONT size=+0&gt; file.Extension.&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Equals&lt;/FONT&gt;&lt;FONT size=+0&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515&gt;".xml"&lt;/FONT&gt;&lt;FONT size=+0&gt;, String Comparison.CurrentCultureIgnoreCase) _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Let&lt;/FONT&gt;&lt;FONT size=+0&gt; doc = XElement.Load(file.FullName) _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt;&lt;FONT size=+0&gt; doc &lt;/FONT&gt;&lt;FONT color=#555555&gt;%&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;Plays&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#6464b9&gt;&lt;FONT color=#000000&gt;Easy. Now I have a new XML document containing the complete plays of Shakespeare. Now, what can we do with it... Well, we can get a count of the plays in one line:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#6464b9&gt;&lt;FONT size=+0&gt;
&lt;P&gt;Console.WriteLine(&lt;/FONT&gt;&lt;FONT color=#a31515&gt;"Plays found: "&lt;/FONT&gt;&lt;FONT size=+0&gt; &amp;amp; plays.&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size=+0&gt;PLAY&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;.Count.ToString)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;We could have done that without putting it into a new document. We do see that we have 37 plays represented, so we know the first query worked. Now, to count the number of lines (LINE) for each character (SPEAKER). The XML document groups each set of lines into a parent node called SPEECH. This SPEECH node then contains the SPEAKER element and a series of LINE elements. For example, here's the beginning of Juliet's fameous Romeo, Romeo speech:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#6464b9&gt;
&lt;P&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;SPEECH&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;SPEAKER&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#555555&gt;JULIET&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;SPEAKER&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#555555&gt;O Romeo, Romeo! wherefore art thou Romeo?&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#555555&gt;Deny thy father and refuse thy name;&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#555555&gt;Or, if thou wilt not, be but sworn my love,&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#555555&gt;And I'll no longer be a Capulet.&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#844646&gt;SPEECH&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#6464b9&gt;&lt;FONT color=#000000&gt;So to achieve the goal of counting our lines by character, we find the descendent nodes of the plays element (plays...&amp;lt;SPEECH&amp;gt;) and group them by the speaker. Then we project out the name of the speaker and the number of lines they have. We don't care about the bit roles, so we'll order the results in descending form based on the number of lines (LineCount). We'll limit the results to the top 50 entries. Here's the resulting query:&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;&lt;FONT size=+0&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt;&lt;FONT size=+0&gt; mostLines = _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;From&lt;/FONT&gt;&lt;FONT size=+0&gt; speech &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;In&lt;/FONT&gt;&lt;FONT size=+0&gt; plays...&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size=+0&gt;SPEECH&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT size=+0&gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Group&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;By&lt;/FONT&gt;&lt;FONT size=+0&gt; key = speech.&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size=+0&gt;SPEAKER&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;.Value &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Into&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Group&lt;/FONT&gt;&lt;FONT size=+0&gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt;&lt;FONT size=+0&gt; Speaker = key, _&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; LineCount = &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Group&lt;/FONT&gt;&lt;FONT size=+0&gt;.&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size=+0&gt;LINE&lt;/FONT&gt;&lt;FONT color=#6464b9&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;.Count _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Order&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;By&lt;/FONT&gt;&lt;FONT size=+0&gt; LineCount &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Descending&lt;/FONT&gt;&lt;FONT size=+0&gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Take&lt;/FONT&gt;&lt;FONT size=+0&gt; 50&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;&lt;FONT color=#000000&gt;The amazing thing with this process, running all three queries here, including the one which loads the full XML from the various files takes less than a second. I haven't had time to do a full performance test, including memory load, but the initial results are quite impressive! &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;&lt;FONT color=#000000&gt;If you have other creative uses of LINQ to XML, let me know, I'd love to include them in future presentations. Also, if you're in the Huntsville, AL area on 2/23/2008, head on over to the code camp and see the entire presentation in person.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=kAKy8I"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=kAKy8I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=urySoI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=urySoI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=7o1rLi"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=7o1rLi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=9uWrkI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=9uWrkI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=SdWuiI"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=SdWuiI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=8iS69i"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=8iS69i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/thinqlinq/rss?a=KnhFui"&gt;&lt;img src="http://feeds.feedburner.com/~f/thinqlinq/rss?i=KnhFui" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/thinqlinq/rss/~4/239687819" height="1" width="1"/&gt;</description>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId9">VB Dev Center</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId1">LINQ</category>
      <category domain="http://www.thinqlinq.com/Default.aspx?CategoryId7">VB</category>
    <feedburner:origLink>http://www.thinqlinq.com/Default.aspx?Postid=21989</feedburner:origLink></item>
  </channel>
</rss>
