<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" 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/" version="2.0">
  <channel>
    <title>The Blomsma Code - LINQ</title>
    <link>http://www.develop-one.net/blog/</link>
    <description>The mysteries of software development and networking...</description>
    <language>en-us</language>
    <copyright>Develop-One</copyright>
    <lastBuildDate>Tue, 01 Nov 2011 15:34:36 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mark.blomsma@develop-one.com</managingEditor>
    <webMaster>mark.blomsma@develop-one.com</webMaster>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=ae42c4b4-4d6e-464e-98e0-c430ea35b4ab</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,ae42c4b4-4d6e-464e-98e0-c430ea35b4ab.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,ae42c4b4-4d6e-464e-98e0-c430ea35b4ab.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ae42c4b4-4d6e-464e-98e0-c430ea35b4ab</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier
to use LINQ to XML with a streaming approach. The code sample below will load nodes
from an arbitrary XML files and yield them to the caller as they’re read from file:
</p>
        <div class="csharpcode">
          <pre class="alt">
            <span class="kwrd">static</span> IEnumerable&lt;XElement&gt; Load(<span class="kwrd">string</span> filename, <span class="kwrd">string</span> elementName)</pre>
          <pre>{</pre>
          <pre class="alt">    XmlReaderSettings settings = <span class="kwrd">new</span> XmlReaderSettings();</pre>
          <pre>    settings.IgnoreWhitespace = <span class="kwrd">true</span>;</pre>
          <pre class="alt">
            <span class="kwrd">using</span> (XmlReader reader = XmlReader.Create(filename,
settings))</pre>
          <pre>    {</pre>
          <pre class="alt">
            <span class="kwrd">while</span> (reader.ReadToFollowing(elementName))</pre>
          <pre>        {</pre>
          <pre class="alt">
            <span class="rem">// build element from subtree</span>
          </pre>
          <pre>            XElement element = XElement.Load(reader.ReadSubtree());</pre>
          <pre class="alt">
            <span class="kwrd">yield</span>
            <span class="kwrd">return</span> element;</pre>
          <pre>        }</pre>
          <pre class="alt">    }</pre>
          <pre>}</pre>
        </div>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
      </body>
      <title>Streaming XML using LINQ to XML (continued)</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,ae42c4b4-4d6e-464e-98e0-c430ea35b4ab.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/11/01/StreamingXMLUsingLINQToXMLContinued.aspx</link>
      <pubDate>Tue, 01 Nov 2011 15:34:36 GMT</pubDate>
      <description>&lt;p&gt;
Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier
to use LINQ to XML with a streaming approach. The code sample below will load nodes
from an arbitrary XML files and yield them to the caller as they’re read from file:
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; IEnumerable&amp;lt;XElement&amp;gt; Load(&lt;span class="kwrd"&gt;string&lt;/span&gt; filename, &lt;span class="kwrd"&gt;string&lt;/span&gt; elementName)&lt;/pre&gt;
&lt;pre&gt;{&lt;/pre&gt;
&lt;pre class="alt"&gt;    XmlReaderSettings settings = &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlReaderSettings();&lt;/pre&gt;
&lt;pre&gt;    settings.IgnoreWhitespace = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;using&lt;/span&gt; (XmlReader reader = XmlReader.Create(filename,
settings))&lt;/pre&gt;
&lt;pre&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;while&lt;/span&gt; (reader.ReadToFollowing(elementName))&lt;/pre&gt;
&lt;pre&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="rem"&gt;// build element from subtree&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;            XElement element = XElement.Load(reader.ReadSubtree());&lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;yield&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; element;&lt;/pre&gt;
&lt;pre&gt;        }&lt;/pre&gt;
&lt;pre class="alt"&gt;    }&lt;/pre&gt;
&lt;pre&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,ae42c4b4-4d6e-464e-98e0-c430ea35b4ab.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=76fc5c58-9545-4d17-b953-788033af34f2</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,76fc5c58-9545-4d17-b953-788033af34f2.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,76fc5c58-9545-4d17-b953-788033af34f2.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=76fc5c58-9545-4d17-b953-788033af34f2</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just rediscovered this blog post about reading and parsing XML as it becomes available
in conjunction with LINQ to XML: <a title="http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx" href="http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx">http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx</a></p>
        <p>
It’s a little dated, but still relevant <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Streaming-XML_DDD9/wlEmoticon-smile_2.png" />.
</p>
      </body>
      <title>Streaming XML</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,76fc5c58-9545-4d17-b953-788033af34f2.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/10/31/StreamingXML.aspx</link>
      <pubDate>Mon, 31 Oct 2011 22:48:11 GMT</pubDate>
      <description>&lt;p&gt;
I just rediscovered this blog post about reading and parsing XML as it becomes available
in conjunction with LINQ to XML: &lt;a title="http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx" href="http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx"&gt;http://blogs.msdn.com/b/xmlteam/archive/2007/03/24/streaming-with-linq-to-xml-part-2.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It’s a little dated, but still relevant &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Streaming-XML_DDD9/wlEmoticon-smile_2.png" /&gt;.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,76fc5c58-9545-4d17-b953-788033af34f2.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just came across this great picture of what’s new in .NET Framework 4.5 (click for
larger version):
</p>
        <p>
          <a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Whats-new-in-.NET-Framework-4.5_5A7E/WhatsNewNET45-en_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WhatsNewNET45-en" border="0" alt="WhatsNewNET45-en" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Whats-new-in-.NET-Framework-4.5_5A7E/WhatsNewNET45-en_thumb.png" width="644" height="457" />
          </a>
        </p>
      </body>
      <title>What’s new in .NET Framework 4.5</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/10/31/WhatsNewInNETFramework45.aspx</link>
      <pubDate>Mon, 31 Oct 2011 13:27:48 GMT</pubDate>
      <description>&lt;p&gt;
Just came across this great picture of what’s new in .NET Framework 4.5 (click for
larger version):
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Whats-new-in-.NET-Framework-4.5_5A7E/WhatsNewNET45-en_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WhatsNewNET45-en" border="0" alt="WhatsNewNET45-en" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Whats-new-in-.NET-Framework-4.5_5A7E/WhatsNewNET45-en_thumb.png" width="644" height="457" /&gt;&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,ee85e660-a94b-41db-9fe5-5f4bc8ef1d8b.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>LINQ</category>
      <category>VB.NET</category>
      <category>WCF</category>
      <category>WF</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=26511de4-79f4-48ff-b231-ba879a8a25de</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,26511de4-79f4-48ff-b231-ba879a8a25de.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,26511de4-79f4-48ff-b231-ba879a8a25de.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=26511de4-79f4-48ff-b231-ba879a8a25de</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Suppose I have a list of time cards from multiple employees, but I want to group them
into dictionary, based on the Social Security Number (SSN) of the employee. Here is
an example of how to convert a list of items into a dictionary of lists: 
<br /></p>
        <div class="csharpcode">
          <pre class="alt">Dictionary&lt;<span class="kwrd">string</span>, List&lt;TimeCardInfo&gt;&gt;
dict;</pre>
          <pre> </pre>
          <pre class="alt">dict = ( from timecard <span class="kwrd">in</span> listOfTimeCards</pre>
          <pre>         group timecard by timecard.SSN ).ToDictionary( x =&gt; x.Key, x =&gt; x.ToList() );</pre>
        </div>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
      </body>
      <title>LINQ: Convert list to a dictionary of lists</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,26511de4-79f4-48ff-b231-ba879a8a25de.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/07/11/LINQConvertListToADictionaryOfLists.aspx</link>
      <pubDate>Mon, 11 Jul 2011 13:49:14 GMT</pubDate>
      <description>&lt;p&gt;
Suppose I have a list of time cards from multiple employees, but I want to group them
into dictionary, based on the Social Security Number (SSN) of the employee. Here is
an example of how to convert a list of items into a dictionary of lists: 
&lt;br /&gt;
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, List&amp;lt;TimeCardInfo&amp;gt;&amp;gt;
dict;&lt;/pre&gt;
&lt;pre&gt;&amp;#160;&lt;/pre&gt;
&lt;pre class="alt"&gt;dict = ( from timecard &lt;span class="kwrd"&gt;in&lt;/span&gt; listOfTimeCards&lt;/pre&gt;
&lt;pre&gt;         group timecard by timecard.SSN ).ToDictionary( x =&amp;gt; x.Key, x =&amp;gt; x.ToList() );&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,26511de4-79f4-48ff-b231-ba879a8a25de.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=f9db7249-abff-4145-8cc4-c8e423d7c68b</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,f9db7249-abff-4145-8cc4-c8e423d7c68b.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,f9db7249-abff-4145-8cc4-c8e423d7c68b.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f9db7249-abff-4145-8cc4-c8e423d7c68b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you’re using the Entity Framework and don’t want to implement ToTraceString() at
strategic points in your code in order to see what kind of SQL statements are getting
generated then check out one of the following:
</p>
        <ul>
          <li>
Community Entity Framework Provider Wrappers (free) 
<ul><li><a href="http://efwrappers.codeplex.com">http://efwrappers.codeplex.com</a><a href="http://efwrappers.codeplex.com/">/</a></li><li>
Or use NuGet: 
<ul><li>
Install-Package CommunityEFProviderWrappers.EFTracingProvider 
</li></ul></li></ul></li>
          <li>
Entity Framework Profiler 
</li>
          <ul>
            <li>
              <a title="http://efprof.com/" href="http://efprof.com/">http://efprof.com/</a>
            </li>
          </ul>
          <li>
SQL Server Profiler</li>
          <ul>
            <li>
More info on setting up SQL Server Profiler: <a href="http://blog.tonysneed.com/2010/08/05/setting-up-sql-server-2008-express-with-profiler">http://blog.tonysneed.com/2010/08/05/setting-up-sql-server-2008-express-with-profiler</a></li>
          </ul>
        </ul>
        <p>
          <em>Update 07-02-2011: Added SQL Server Profiler after comment by Tony Sneed.</em>
        </p>
      </body>
      <title>Logging and tracing with Entity Framework</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,f9db7249-abff-4145-8cc4-c8e423d7c68b.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/06/29/LoggingAndTracingWithEntityFramework.aspx</link>
      <pubDate>Wed, 29 Jun 2011 13:07:03 GMT</pubDate>
      <description>&lt;p&gt;
If you’re using the Entity Framework and don’t want to implement ToTraceString() at
strategic points in your code in order to see what kind of SQL statements are getting
generated then check out one of the following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Community Entity Framework Provider Wrappers (free) 
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://efwrappers.codeplex.com"&gt;http://efwrappers.codeplex.com&lt;/a&gt;&lt;a href="http://efwrappers.codeplex.com/"&gt;/&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Or use NuGet: 
&lt;ul&gt;
&lt;li&gt;
Install-Package CommunityEFProviderWrappers.EFTracingProvider 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Entity Framework Profiler 
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a title="http://efprof.com/" href="http://efprof.com/"&gt;http://efprof.com/&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
SQL Server Profiler&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
More info on setting up SQL Server Profiler: &lt;a href="http://blog.tonysneed.com/2010/08/05/setting-up-sql-server-2008-express-with-profiler"&gt;http://blog.tonysneed.com/2010/08/05/setting-up-sql-server-2008-express-with-profiler&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;em&gt;Update 07-02-2011: Added SQL Server Profiler after comment by Tony Sneed.&lt;/em&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,f9db7249-abff-4145-8cc4-c8e423d7c68b.aspx</comments>
      <category>Entity Framework</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=af239c48-5587-489a-97d1-9063f78c6fa8</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,af239c48-5587-489a-97d1-9063f78c6fa8.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,af239c48-5587-489a-97d1-9063f78c6fa8.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=af239c48-5587-489a-97d1-9063f78c6fa8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you’re doing Model First with Entity Framework you may run into a scenario where
you want to design a 1-to-1 relationship, but also have a foreign key be available
on your entity. The default behavior in Entity Framework when doing a 1-to-1 relationship
(with Model First), or 1-to-0..1 relationship, is to create a foreign key on the 0..1
side of the association but hide the foreign key. A better approach is this:
</p>
        <ul>
          <li>
Start a new model</li>
          <li>
Add the entity that goes on the 1 side of the association, give it a primary key of
type integer. Make sure the StoreGeneratedPattern property is set to <strong>Identity</strong>.</li>
          <li>
Add the entity that goes on the 0..1 side of the assocation, name the primary key
as you would a foreign key, make it of type integer. Make sure the StoreGeneratedPattern
property is set to <strong>None</strong>. 
<br /><a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb_1.png" width="301" height="237" /></a></li>
          <li>
Click on the 1 entity and add an association, make it a 1-to-0..1, example: 
<br /><a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb_2.png" width="359" height="152" /></a></li>
          <li>
Double click the association and set a referential constraint. 
<br /><a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb.png" width="362" height="209" /></a></li>
          <li>
Now you’re ready to generate your database schema.</li>
        </ul>
      </body>
      <title>Entity Framework - Model First: One-to-One relationship</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,af239c48-5587-489a-97d1-9063f78c6fa8.aspx</guid>
      <link>http://www.develop-one.net/blog/2011/06/29/EntityFrameworkModelFirstOnetoOneRelationship.aspx</link>
      <pubDate>Wed, 29 Jun 2011 07:35:03 GMT</pubDate>
      <description>&lt;p&gt;
If you’re doing Model First with Entity Framework you may run into a scenario where
you want to design a 1-to-1 relationship, but also have a foreign key be available
on your entity. The default behavior in Entity Framework when doing a 1-to-1 relationship
(with Model First), or 1-to-0..1 relationship, is to create a foreign key on the 0..1
side of the association but hide the foreign key. A better approach is this:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Start a new model&lt;/li&gt;
&lt;li&gt;
Add the entity that goes on the 1 side of the association, give it a primary key of
type integer. Make sure the StoreGeneratedPattern property is set to &lt;strong&gt;Identity&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
Add the entity that goes on the 0..1 side of the assocation, name the primary key
as you would a foreign key, make it of type integer. Make sure the StoreGeneratedPattern
property is set to &lt;strong&gt;None&lt;/strong&gt;. 
&lt;br /&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb_1.png" width="301" height="237" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Click on the 1 entity and add an association, make it a 1-to-0..1, example: 
&lt;br /&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb_2.png" width="359" height="152" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Double click the association and set a referential constraint. 
&lt;br /&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.develop-one.net/blog/content/binary/Windows-Live-Writer/Entity-Framework---Model-First-One-to-On_74BA/image_thumb.png" width="362" height="209" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Now you’re ready to generate your database schema.&lt;/li&gt;
&lt;/ul&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,af239c48-5587-489a-97d1-9063f78c6fa8.aspx</comments>
      <category>Entity Framework</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=849908b7-f3a2-443e-b5d8-f5f71d701a95</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,849908b7-f3a2-443e-b5d8-f5f71d701a95.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,849908b7-f3a2-443e-b5d8-f5f71d701a95.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=849908b7-f3a2-443e-b5d8-f5f71d701a95</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve been using the ReportViewer control in Visual Studio quite a bit to create RDLC
(offline) reports that are based on the result of LINQ queries against object trees.
It’s been a while since there has been a new release of this control and Visual Studio
2010 did not include anything major with regards to the ReportViewer control. I asked
around and got an email from <a href="http://blogs.msdn.com/robertbruckner/" target="_blank">Robert
Bruckner</a> answering my two main questions:
</p>
        <p>
1. Yes, the ReportViewer control in VS2010 will run on both .NET 3.5 as well as .NET
4.0.<br />
2. Yes, the ReportViewer control in VS2010 will support Export to Word for RDLC (offline)
scenarios.
</p>
        <p>
Thanks Robert (and the rest of the people working on this technology), great news!
</p>
      </body>
      <title>ReportViewer in VS2010</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,849908b7-f3a2-443e-b5d8-f5f71d701a95.aspx</guid>
      <link>http://www.develop-one.net/blog/2009/07/20/ReportViewerInVS2010.aspx</link>
      <pubDate>Mon, 20 Jul 2009 12:55:13 GMT</pubDate>
      <description>&lt;p&gt;
I’ve been using the ReportViewer control in Visual Studio quite a bit to create RDLC
(offline) reports that are based on the result of LINQ queries against object trees.
It’s been a while since there has been a new release of this control and Visual Studio
2010 did not include anything major with regards to the ReportViewer control. I asked
around and got an email from &lt;a href="http://blogs.msdn.com/robertbruckner/" target="_blank"&gt;Robert
Bruckner&lt;/a&gt; answering my two main questions:
&lt;/p&gt;
&lt;p&gt;
1. Yes, the ReportViewer control in VS2010 will run on both .NET 3.5 as well as .NET
4.0.&lt;br&gt;
2. Yes, the ReportViewer control in VS2010 will support Export to Word for RDLC (offline)
scenarios.
&lt;/p&gt;
&lt;p&gt;
Thanks Robert (and the rest of the people working on this technology), great news!
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,849908b7-f3a2-443e-b5d8-f5f71d701a95.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
      <category>SQL</category>
      <category>Team System</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=29bac901-8c99-43ed-b5d0-7395840d0b0d</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,29bac901-8c99-43ed-b5d0-7395840d0b0d.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,29bac901-8c99-43ed-b5d0-7395840d0b0d.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=29bac901-8c99-43ed-b5d0-7395840d0b0d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I guess the success for LINQ to SQL makes it hard for Entity Framework to absorb the
full feature set in a single (v2) release. The team has been working on a bunch of
fixes and improvements to be delivered in .NET 4.0.
</p>
        <p>
Here is the list <a href="http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40" target="_blank">as
posted by Damien</a>:
</p>
        <h5>
          <a href="http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40">LINQ
to SQL changes in .NET 4.0</a>
        </h5>
        <h5>Change list
</h5>
        <h6>Performance
</h6>
        <ul>
          <li>
Query plans are reused more often by specifically defining text parameter lengths 
</li>
          <li>
Identity cache lookups for primary key with single result now includes query.Where(predicate).Single/SingleOrDefault/First/FirstOrDefault 
</li>
          <li>
Reduced query execution overhead when DataLoadOptions specified (cache lookup considers
DataLoadOptions value equivalency – post beta 1) 
</li>
        </ul>
        <h6>Usability
</h6>
        <ul>
          <li>
ITable&lt;T&gt; interface for additional mocking possibilities 
</li>
          <li>
Contains with enums automatically casts to int or string depending on column type 
</li>
          <li>
Associations can now specify non-primary-key columns on the other end of the association
for updates 
</li>
          <li>
Support list initialization syntax for queries 
</li>
          <li>
LinqDataSource now supports inherited entities 
</li>
          <li>
LinqDataSource support for Dynamic Data query extenders added 
</li>
        </ul>
        <h6>Query stability
</h6>
        <ul>
          <li>
Contains now detects self-referencing IQueryable and doesn't cause a stack overflow 
</li>
          <li>
Skip(0) no longer prevents eager loading 
</li>
          <li>
GetCommand operates within SQL Compact transactions 
</li>
          <li>
Exposing Link&lt;T&gt; on a property/field is detected and reported correctly 
</li>
          <li>
Compiled queries now correctly detect a change in mapping source and throw 
</li>
          <li>
String.StartsWith, EndsWith and Contains now correctly handles ~ in the search string 
</li>
          <li>
Now detects multiple active result sets (MARS) better 
</li>
          <li>
Associations are properly created between entities when using eager loading with Table-Valued
Functions (TVFs) 
</li>
          <li>
Queries that contain sub-queries with scalar projections now work better 
</li>
        </ul>
        <h6>Update stability
</h6>
        <ul>
          <li>
SubmitChanges no longer silently consumes transaction rollback exceptions 
</li>
          <li>
SubmitChanges deals with timestamps in a change conflict scenario properly 
</li>
          <li>
IsDbGenerated now honors renamed properties that don't match underlying column name 
</li>
          <li>
Server-generated columns and SQL replication/triggers now work instead of throwing
SQL exception 
</li>
        </ul>
        <h6>General stability
</h6>
        <ul>
          <li>
Binary types equate correctly after deserialization 
</li>
          <li>
EntitySet.ListChanged fired when adding items to an unloaded entity set 
</li>
          <li>
Dispose our connections upon context disposal (ones passed in are untouched) 
</li>
        </ul>
        <h6>SQL Metal
</h6>
        <ul>
          <li>
Foreign key property setter now checks all affected associations not just the first 
</li>
          <li>
Improved error handling when primary key type not supported 
</li>
          <li>
Now skips stored procedures containing table-valued parameters instead of aborting
process 
</li>
          <li>
Can now be used against connections that use AttachDbFilename syntax 
</li>
          <li>
No longer crashes when unexpected data types are encountered 
</li>
        </ul>
        <h6>LINQ to SQL class designer
</h6>
        <ul>
          <li>
Now handles a single anonymously named column in SQL result set 
</li>
          <li>
Improved error message for associations to nullable unique columns 
</li>
          <li>
No longer fails when using clauses are added to the partial user class 
</li>
          <li>
VarChar(1) now correctly maps to string and not char 
</li>
          <li>
Decimal precision and scale are now emitted correctly in the DbType attributes for
stored procedures 
</li>
          <li>
Foreign key changes will be picked up when bringing tables back into the designer
without a restart 
</li>
        </ul>
        <h6>Code generation (SQL Metal + LINQ to SQL class designer)
</h6>
        <ul>
          <li>
Stored procedures using original values now compiles when the entity and context namespaces
differ 
</li>
          <li>
Virtual internal now generates correct syntax 
</li>
          <li>
Mapping attributes are now fully qualified to prevent conflicts with user types 
</li>
          <li>
KnownTypeAttributes are now emitted for DataContractSerializer with inheritance 
</li>
          <li>
Delay-loaded foreign keys now have the correct, compilable, code generated 
</li>
          <li>
Using stored procedures with concurrency no longer gets confused if entities in different
namespace to context 
</li>
          <li>
ForeignKeyReferenceAlreadyHasValueException is now thrown if any association is loaded
not just the first 
</li>
        </ul>
        <h5>
        </h5>
        <h5>Potentially breaking changes
</h5>
        <p>
We worked very hard to avoid breaking changes but of course any potential bug fix
is a breaking change if your application was depending on the wrong behavior. The
ones I specifically want to call out are: 
</p>
        <h6>Skip(0) is no longer a no-op
</h6>
        <p>
The special-casing of 0 for Skip to be a no-op was causing some subtle issues such
as eager loading to fail and we took the decision to stop special casing this. This
means if you had syntax that was invalid for a Skip greater than 0 it will now also
be invalid for skip with a 0. This makes more sense and means your app would break
on the first page now instead of subtlety breaking on the second page. Fail fast :) 
</p>
        <h6>ForeignKeyReferenceAlreadyHasValue exception
</h6>
        <p>
If you are getting this exception where you weren’t previously it means you have an
underlying foreign key with multiple associations based on it and you are trying to
change the underlying foreign key even though we have associations loaded.Best thing
to do here is to set the associations themselves and if you can’t do that make sure
they aren’t loaded when you want to set the foreign key to avoid inconsistencies. 
</p>
      </body>
      <title>LINQ to SQL to remain alive a little longer? LINQ to SQL changes in .NET 4.0</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,29bac901-8c99-43ed-b5d0-7395840d0b0d.aspx</guid>
      <link>http://www.develop-one.net/blog/2009/06/03/LINQToSQLToRemainAliveALittleLongerLINQToSQLChangesInNET40.aspx</link>
      <pubDate>Wed, 03 Jun 2009 00:48:30 GMT</pubDate>
      <description>&lt;p&gt;
I guess the success for LINQ to SQL makes it hard for Entity Framework to absorb the
full feature set in a single (v2) release. The team has been working on a bunch of
fixes and improvements to be delivered in .NET 4.0.
&lt;/p&gt;
&lt;p&gt;
Here is the list &lt;a href="http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40" target="_blank"&gt;as
posted by Damien&lt;/a&gt;:
&lt;/p&gt;
&lt;h5&gt;&lt;a href="http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40"&gt;LINQ
to SQL changes in .NET 4.0&lt;/a&gt;
&lt;/h5&gt;
&lt;h5&gt;Change list
&lt;/h5&gt;
&lt;h6&gt;Performance
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Query plans are reused more often by specifically defining text parameter lengths 
&lt;li&gt;
Identity cache lookups for primary key with single result now includes query.Where(predicate).Single/SingleOrDefault/First/FirstOrDefault 
&lt;li&gt;
Reduced query execution overhead when DataLoadOptions specified (cache lookup considers
DataLoadOptions value equivalency – post beta 1) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;Usability
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
ITable&amp;lt;T&amp;gt; interface for additional mocking possibilities 
&lt;li&gt;
Contains with enums automatically casts to int or string depending on column type 
&lt;li&gt;
Associations can now specify non-primary-key columns on the other end of the association
for updates 
&lt;li&gt;
Support list initialization syntax for queries 
&lt;li&gt;
LinqDataSource now supports inherited entities 
&lt;li&gt;
LinqDataSource support for Dynamic Data query extenders added 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;Query stability
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Contains now detects self-referencing IQueryable and doesn't cause a stack overflow 
&lt;li&gt;
Skip(0) no longer prevents eager loading 
&lt;li&gt;
GetCommand operates within SQL Compact transactions 
&lt;li&gt;
Exposing Link&amp;lt;T&amp;gt; on a property/field is detected and reported correctly 
&lt;li&gt;
Compiled queries now correctly detect a change in mapping source and throw 
&lt;li&gt;
String.StartsWith, EndsWith and Contains now correctly handles ~ in the search string 
&lt;li&gt;
Now detects multiple active result sets (MARS) better 
&lt;li&gt;
Associations are properly created between entities when using eager loading with Table-Valued
Functions (TVFs) 
&lt;li&gt;
Queries that contain sub-queries with scalar projections now work better 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;Update stability
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
SubmitChanges no longer silently consumes transaction rollback exceptions 
&lt;li&gt;
SubmitChanges deals with timestamps in a change conflict scenario properly 
&lt;li&gt;
IsDbGenerated now honors renamed properties that don't match underlying column name 
&lt;li&gt;
Server-generated columns and SQL replication/triggers now work instead of throwing
SQL exception 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;General stability
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Binary types equate correctly after deserialization 
&lt;li&gt;
EntitySet.ListChanged fired when adding items to an unloaded entity set 
&lt;li&gt;
Dispose our connections upon context disposal (ones passed in are untouched) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;SQL Metal
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Foreign key property setter now checks all affected associations not just the first 
&lt;li&gt;
Improved error handling when primary key type not supported 
&lt;li&gt;
Now skips stored procedures containing table-valued parameters instead of aborting
process 
&lt;li&gt;
Can now be used against connections that use AttachDbFilename syntax 
&lt;li&gt;
No longer crashes when unexpected data types are encountered 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;LINQ to SQL class designer
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Now handles a single anonymously named column in SQL result set 
&lt;li&gt;
Improved error message for associations to nullable unique columns 
&lt;li&gt;
No longer fails when using clauses are added to the partial user class 
&lt;li&gt;
VarChar(1) now correctly maps to string and not char 
&lt;li&gt;
Decimal precision and scale are now emitted correctly in the DbType attributes for
stored procedures 
&lt;li&gt;
Foreign key changes will be picked up when bringing tables back into the designer
without a restart 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;Code generation (SQL Metal + LINQ to SQL class designer)
&lt;/h6&gt;
&lt;ul&gt;
&lt;li&gt;
Stored procedures using original values now compiles when the entity and context namespaces
differ 
&lt;li&gt;
Virtual internal now generates correct syntax 
&lt;li&gt;
Mapping attributes are now fully qualified to prevent conflicts with user types 
&lt;li&gt;
KnownTypeAttributes are now emitted for DataContractSerializer with inheritance 
&lt;li&gt;
Delay-loaded foreign keys now have the correct, compilable, code generated 
&lt;li&gt;
Using stored procedures with concurrency no longer gets confused if entities in different
namespace to context 
&lt;li&gt;
ForeignKeyReferenceAlreadyHasValueException is now thrown if any association is loaded
not just the first 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
&lt;/h5&gt;
&lt;h5&gt;Potentially breaking changes
&lt;/h5&gt;
&lt;p&gt;
We worked very hard to avoid breaking changes but of course any potential bug fix
is a breaking change if your application was depending on the wrong behavior. The
ones I specifically want to call out are: 
&lt;h6&gt;Skip(0) is no longer a no-op
&lt;/h6&gt;
&lt;p&gt;
The special-casing of 0 for Skip to be a no-op was causing some subtle issues such
as eager loading to fail and we took the decision to stop special casing this. This
means if you had syntax that was invalid for a Skip greater than 0 it will now also
be invalid for skip with a 0. This makes more sense and means your app would break
on the first page now instead of subtlety breaking on the second page. Fail fast :) 
&lt;h6&gt;ForeignKeyReferenceAlreadyHasValue exception
&lt;/h6&gt;
&lt;p&gt;If you are getting this exception where you weren’t previously it means you have an underlying foreign key with multiple associations based on it and you are trying to change the underlying foreign key even though we have associations loaded.Best thing to do here is to set the associations themselves and if you can’t do that make sure they aren’t loaded when you want to set the foreign key to avoid inconsistencies.  </description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,29bac901-8c99-43ed-b5d0-7395840d0b0d.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=237ce980-1eb1-46c1-97ed-26ee77106004</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,237ce980-1eb1-46c1-97ed-26ee77106004.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,237ce980-1eb1-46c1-97ed-26ee77106004.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=237ce980-1eb1-46c1-97ed-26ee77106004</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yeah, my last Training Kit is shipping!
</p>
        <p>
Get a copy now at Amazon: <b><a href="http://tinyurl.com/dxwdz5">http://tinyurl.com/dxwdz5</a></b></p>
        <p>
          <img src="http://ecx.images-amazon.com/images/I/51WcV7glpJL._SS500_.jpg" />
        </p>
      </body>
      <title>Training Kit now on sale at Amazon.com</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,237ce980-1eb1-46c1-97ed-26ee77106004.aspx</guid>
      <link>http://www.develop-one.net/blog/2009/04/06/TrainingKitNowOnSaleAtAmazoncom.aspx</link>
      <pubDate>Mon, 06 Apr 2009 19:21:19 GMT</pubDate>
      <description>&lt;p&gt;
Yeah, my last Training Kit is shipping!
&lt;/p&gt;
&lt;p&gt;
Get a copy now at Amazon: &lt;b&gt;&lt;a href="http://tinyurl.com/dxwdz5"&gt;http://tinyurl.com/dxwdz5&lt;/a&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://ecx.images-amazon.com/images/I/51WcV7glpJL._SS500_.jpg"&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,237ce980-1eb1-46c1-97ed-26ee77106004.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>General</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=f63eef11-3daf-40f6-9f19-d071761641af</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,f63eef11-3daf-40f6-9f19-d071761641af.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,f63eef11-3daf-40f6-9f19-d071761641af.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f63eef11-3daf-40f6-9f19-d071761641af</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://msdn.microsoft.com/en-us/library/bb739065.aspx" target="_blank">documentation</a> doesn't
specifiy it but in the Entity Framework when you call ObjectContext.SaveChanges the
update is 'wrapped' in a transaction.
</p>
        <p>
          <font size="2" face="Courier New">NorthwindIBModel model = new NorthwindIBModel();<br /></font>
        </p>
        <p>
          <font size="2" face="Courier New">Guid id = Guid.NewGuid(); 
<br /></font>
        </p>
        <p>
          <font size="2" face="Courier New">model.AddToCustomer(new Customer() { CustomerID
= id, ContactName = "Andrew", CompanyName = "Northwind Traders" });<br />
model.AddToCustomer(new Customer() { CustomerID = id, ContactName = "Aikido", CompanyName
= "Northwind Traders " });<br /><br />
model.SaveChanges(); // exception duplicate key - transactional -&gt; no changes to
the database</font>
        </p>
      </body>
      <title>Entity Framework: ObjectContext.SaveChanges is transactional</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,f63eef11-3daf-40f6-9f19-d071761641af.aspx</guid>
      <link>http://www.develop-one.net/blog/2009/03/23/EntityFrameworkObjectContextSaveChangesIsTransactional.aspx</link>
      <pubDate>Mon, 23 Mar 2009 14:45:21 GMT</pubDate>
      <description>&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/en-us/library/bb739065.aspx" target="_blank"&gt;documentation&lt;/a&gt; doesn't
specifiy it but in the Entity Framework when you call ObjectContext.SaveChanges the
update is 'wrapped' in a transaction.
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2" face="Courier New"&gt;NorthwindIBModel model = new NorthwindIBModel();&lt;br&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2" face="Courier New"&gt;Guid id = Guid.NewGuid(); 
&lt;br&gt;
&lt;/font&gt; 
&lt;p&gt;
&lt;font size="2" face="Courier New"&gt;model.AddToCustomer(new Customer() { CustomerID
= id, ContactName = "Andrew", CompanyName = "Northwind Traders" });&lt;br&gt;
model.AddToCustomer(new Customer() { CustomerID = id, ContactName = "Aikido", CompanyName
= "Northwind Traders " });&lt;br&gt;
&lt;br&gt;
model.SaveChanges(); // exception duplicate key - transactional -&amp;gt; no changes to
the database&lt;/font&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,f63eef11-3daf-40f6-9f19-d071761641af.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=c7c21615-2407-4c4a-a62f-db8d370e2b61</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,c7c21615-2407-4c4a-a62f-db8d370e2b61.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,c7c21615-2407-4c4a-a62f-db8d370e2b61.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c7c21615-2407-4c4a-a62f-db8d370e2b61</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just send the last revision of my chapters for <a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1228717778&amp;sr=8-1&amp;tag=develone-20">TK
70-561</a> to the editor. Yeah! Hopefully the book will go to print soon. You can <a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1228717778&amp;sr=8-1&amp;tag=develone-20">pre-order</a> already
on Amazon!
</p>
        <p>
          <a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1228717778&amp;sr=8-1&amp;tag=develone-20">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="393" alt="Cover-TK70-561" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/MCTSSelfPacedT.NETApplicationDevelopment_6AFC/Cover-TK70-561_5.jpg" width="323" border="0" />
          </a>
        </p>
        <p>
For me the last chapter to work on was LINQ to SQL, but the book includes chapters
on learning ADO.NET, Typed DataSets, LINQ to SQL and Entity Framework. You'll need
to know it all. :-)
</p>
        <p>
Stephen Forte has an interesting <a href="http://www.stephenforte.net/CommentView,guid,BC1BC043-3CDC-4AC2-8B46-3C72AD1D61CF.aspx#b8ebc230-08fb-4542-9971-9b6aec282e85">post</a> on
the relevance of LINQ to SQL.
</p>
      </body>
      <title>MCTS Self-Paced Training Kit (Exam 70-561): Microsoft&amp;reg; .NET Framework 3.5 ADO.NET Application Development</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,c7c21615-2407-4c4a-a62f-db8d370e2b61.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/12/08/MCTSSelfPacedTrainingKitExam70561MicrosoftregNETFramework35ADONETApplicationDevelopment.aspx</link>
      <pubDate>Mon, 08 Dec 2008 16:31:08 GMT</pubDate>
      <description>&lt;p&gt;
I just send the last revision of my chapters for &lt;a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228717778&amp;amp;sr=8-1&amp;amp;tag=develone-20"&gt;TK
70-561&lt;/a&gt; to the editor. Yeah! Hopefully the book will go to print soon. You can &lt;a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228717778&amp;amp;sr=8-1&amp;amp;tag=develone-20"&gt;pre-order&lt;/a&gt; already
on Amazon!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228717778&amp;amp;sr=8-1&amp;amp;tag=develone-20"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="393" alt="Cover-TK70-561" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/MCTSSelfPacedT.NETApplicationDevelopment_6AFC/Cover-TK70-561_5.jpg" width="323" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
For me the last chapter to work on was LINQ to SQL, but the book includes chapters
on learning ADO.NET, Typed DataSets, LINQ to SQL and Entity Framework. You'll need
to know it all. :-)
&lt;/p&gt;
&lt;p&gt;
Stephen Forte has an interesting &lt;a href="http://www.stephenforte.net/CommentView,guid,BC1BC043-3CDC-4AC2-8B46-3C72AD1D61CF.aspx#b8ebc230-08fb-4542-9971-9b6aec282e85"&gt;post&lt;/a&gt; on
the relevance of LINQ to SQL.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,c7c21615-2407-4c4a-a62f-db8d370e2b61.aspx</comments>
      <category>General</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=98d866fb-adb3-4d40-91a4-566f7e38a08b</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,98d866fb-adb3-4d40-91a4-566f7e38a08b.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,98d866fb-adb3-4d40-91a4-566f7e38a08b.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=98d866fb-adb3-4d40-91a4-566f7e38a08b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The DataContext.SubmitChanges() method will update the database in the following order:
</p>
        <p>
- Perform all inserts<br />
- Perform all updates<br />
- Perform all deletes
</p>
        <p>
Running SQL Profiler while running the following code will first perform all inserts
on product, then the updates and the deletes. Also note that SubmitChanges will perform
a batch update (which is good). The SubmitChanges is a single statement, but it does
not implement a transaction, so if you want a rollback to occur if an exception occurs
(for instance a foreign key violation) then you'll need to use a TransactionScope.
</p>
        <div style="font-size: 10pt; background: white; color: black; font-family: courier new">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">void</span> UpdateOrders()</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">    <span style="color: blue">using</span> ( <span style="color: blue">var</span> db
= <span style="color: blue">new</span><span style="color: #2b91af">VideoGameStoreDBDataContext</span>()
)</pre>
          <pre style="margin: 0px">    {</pre>
          <pre style="margin: 0px">        <span style="color: blue">var</span> query
=  <span style="color: blue">from</span> p <span style="color: blue">in</span> db.Products</pre>
          <pre style="margin: 0px">                    <span style="color: blue">select</span> p;</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">        <span style="color: blue">foreach</span>(<span style="color: blue">var</span> product <span style="color: blue">in</span> query)</pre>
          <pre style="margin: 0px">        {</pre>
          <pre style="margin: 0px">            product.ListPrice = product.ListPrice * 1.1;</pre>
          <pre style="margin: 0px">            <span style="color: blue">if</span> (
product.ListPrice &gt; 400 )</pre>
          <pre style="margin: 0px">            {</pre>
          <pre style="margin: 0px">                db.Products.DeleteOnSubmit( product );</pre>
          <pre style="margin: 0px">            }</pre>
          <pre style="margin: 0px">        }</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">        <span style="color: #2b91af">ProductType</span> game
= (<span style="color: blue">from</span> pt <span style="color: blue">in</span> db.ProductTypes </pre>
          <pre style="margin: 0px">                         <span style="color: blue">where</span> pt.ProductTypeName
== <span style="color: #a31515">"Game"</span></pre>
          <pre style="margin: 0px">                         <span style="color: blue">select</span> pt).Single();</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">        <span style="color: #2b91af">Product</span> newProduct
= <span style="color: blue">new</span><span style="color: #2b91af">Product</span>()</pre>
          <pre style="margin: 0px">        {</pre>
          <pre style="margin: 0px">            ProductName = <span style="color: #a31515">"Travian"</span>,</pre>
          <pre style="margin: 0px">            ListPrice = 20,</pre>
          <pre style="margin: 0px">            ProductType = game,</pre>
          <pre style="margin: 0px">            ProductDescription = <span style="color: #a31515">"Online
Game"</span>,</pre>
          <pre style="margin: 0px">            ProductTypeID = 1,</pre>
          <pre style="margin: 0px">            ListPriceCurrency = <span style="color: #a31515">"$"</span></pre>
          <pre style="margin: 0px">        };</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">        db.Products.InsertOnSubmit( newProduct );</pre>
          <pre style="margin: 0px">        db.SubmitChanges();</pre>
          <pre style="margin: 0px">    }</pre>
          <pre style="margin: 0px">}</pre>
        </div>
      </body>
      <title>LINQ to SQL SubmitChanges()</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,98d866fb-adb3-4d40-91a4-566f7e38a08b.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/11/30/LINQToSQLSubmitChanges.aspx</link>
      <pubDate>Sun, 30 Nov 2008 11:20:00 GMT</pubDate>
      <description>&lt;p&gt;
The DataContext.SubmitChanges() method will update the database in the following order:
&lt;/p&gt;
&lt;p&gt;
- Perform all inserts&lt;br&gt;
- Perform all updates&lt;br&gt;
- Perform all deletes
&lt;/p&gt;
&lt;p&gt;
Running SQL Profiler while running the following code will first perform all inserts
on product, then the updates and the deletes. Also note that SubmitChanges will perform
a batch update (which is good). The SubmitChanges is a single statement, but it does
not implement a transaction, so if you want a rollback to occur if an exception occurs
(for instance a foreign key violation) then you'll need to use a TransactionScope.
&lt;/p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; UpdateOrders()&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;using&lt;/span&gt; ( &lt;span style="color: blue"&gt;var&lt;/span&gt; db
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;VideoGameStoreDBDataContext&lt;/span&gt;()
)&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; query
=&amp;nbsp; &lt;span style="color: blue"&gt;from&lt;/span&gt; p &lt;span style="color: blue"&gt;in&lt;/span&gt; db.Products&lt;/pre&gt;&lt;pre style="margin: 0px"&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; &lt;span style="color: blue"&gt;select&lt;/span&gt; p;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;foreach&lt;/span&gt;(&lt;span style="color: blue"&gt;var&lt;/span&gt; product &lt;span style="color: blue"&gt;in&lt;/span&gt; query)&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product.ListPrice = product.ListPrice * 1.1;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;if&lt;/span&gt; (
product.ListPrice &amp;gt; 400 )&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px"&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; db.Products.DeleteOnSubmit( product );&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;ProductType&lt;/span&gt; game
= (&lt;span style="color: blue"&gt;from&lt;/span&gt; pt &lt;span style="color: blue"&gt;in&lt;/span&gt; db.ProductTypes &lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;where&lt;/span&gt; pt.ProductTypeName
== &lt;span style="color: #a31515"&gt;"Game"&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;select&lt;/span&gt; pt).Single();&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Product&lt;/span&gt; newProduct
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;Product&lt;/span&gt;()&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductName = &lt;span style="color: #a31515"&gt;"Travian"&lt;/span&gt;,&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListPrice = 20,&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductType = game,&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductDescription = &lt;span style="color: #a31515"&gt;"Online
Game"&lt;/span&gt;,&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductTypeID = 1,&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListPriceCurrency = &lt;span style="color: #a31515"&gt;"$"&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.Products.InsertOnSubmit( newProduct );&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.SubmitChanges();&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,98d866fb-adb3-4d40-91a4-566f7e38a08b.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=8bc55e9c-7bec-4269-aec5-737175f3aa92</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,8bc55e9c-7bec-4269-aec5-737175f3aa92.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,8bc55e9c-7bec-4269-aec5-737175f3aa92.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8bc55e9c-7bec-4269-aec5-737175f3aa92</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
It would appear that LINQ to SQL is running on a dead end track.
</p>
        <p>
At PDC the announcement was made that no more investments in LINQ to SQL are made
and the Entity Framework will absorb any features that LINQ to SQL has and that are
worth preserving.
</p>
        <p>
The following <a href="http://blogs.msdn.com/adonet/archive/2008/10/31/clarifying-the-message-on-l2s-futures.aspx">message
from Tim Mallalieu</a> says it all:
</p>
        <p>
          <b>
            <em>Is LINQ to SQL Dead?</em>
          </b>
        </p>
        <p>
          <em>We will continue make some investments in LINQ to SQL based on customer feedback.
This post was about making our intentions for future innovation clear and to call
out the fact that as of .NET 4.0, LINQ to Entities will be the recommended data access
solution for LINQ to relational scenarios. As mentioned, we have been working on this
decision for the last few months. When we made the decision, we felt that it was important
to immediately to let the community know. We knew that being open about this would
result in a lot of feedback from the community, but it was important to be transparent
about what we are doing as early as possible.  We want to get this information
out to developers so that you know where we’re headed and can factor that in when
you’re deciding how to build future applications on .NET.  We also want to get
your feedback on the key experiences in LINQ to SQL that we need to add in to LINQ
to Entities in order to enable the same simple scenarios that brought you to use LINQ
to SQL in the first place.</em>
        </p>
      </body>
      <title>LINQ to SQL is dead</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,8bc55e9c-7bec-4269-aec5-737175f3aa92.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/11/01/LINQToSQLIsDead.aspx</link>
      <pubDate>Sat, 01 Nov 2008 10:26:24 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
It would appear that LINQ to SQL is running on a dead end track.
&lt;/p&gt;
&lt;p&gt;
At PDC the announcement was made that no more investments in LINQ to SQL are made
and the Entity Framework will absorb any features that LINQ to SQL has and that are
worth preserving.
&lt;/p&gt;
&lt;p&gt;
The following &lt;a href="http://blogs.msdn.com/adonet/archive/2008/10/31/clarifying-the-message-on-l2s-futures.aspx"&gt;message
from Tim Mallalieu&lt;/a&gt; says it all:
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;&lt;em&gt;Is LINQ to SQL Dead?&lt;/em&gt;&lt;/b&gt; 
&lt;p&gt;
&lt;em&gt;We will continue make some investments in LINQ to SQL based on customer feedback.
This post was about making our intentions for future innovation clear and to call
out the fact that as of .NET 4.0, LINQ to Entities will be the recommended data access
solution for LINQ to relational scenarios. As mentioned, we have been working on this
decision for the last few months. When we made the decision, we felt that it was important
to immediately to let the community know. We knew that being open about this would
result in a lot of feedback from the community, but it was important to be transparent
about what we are doing as early as possible.&amp;nbsp; We want to get this information
out to developers so that you know where we’re headed and can factor that in when
you’re deciding how to build future applications on .NET.&amp;nbsp; We also want to get
your feedback on the key experiences in LINQ to SQL that we need to add in to LINQ
to Entities in order to enable the same simple scenarios that brought you to use LINQ
to SQL in the first place.&lt;/em&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,8bc55e9c-7bec-4269-aec5-737175f3aa92.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=97d1e716-acab-4f4c-98c0-44a2aed22c92</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,97d1e716-acab-4f4c-98c0-44a2aed22c92.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,97d1e716-acab-4f4c-98c0-44a2aed22c92.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=97d1e716-acab-4f4c-98c0-44a2aed22c92</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After discovering that the LINQ to SQL Designer will only support tables from a single
data source I set out to manually implement a cross database query using two data
contexts.
</p>
        <p>
The result is the following query which joins orders in the OrderDB to products in
the VideoGameStoreDB.
</p>
        <div style="font-size: 10pt; background: white; color: black; font-family: courier new">
          <p style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: #2b91af">List</span>&lt;<span style="color: #2b91af">Order</span>&gt;
FindOrders( <span style="color: blue">string</span> typename )
</p>
          <p style="margin: 0px">
{
</p>
          <p style="margin: 0px">
    <span style="color: blue">try</span></p>
          <p style="margin: 0px">
    {
</p>
          <p style="margin: 0px">
        <span style="color: blue">var</span> productdb
= <span style="color: blue">new</span><span style="color: #2b91af">VideoGameStoreDBDataContext</span>();
</p>
          <p style="margin: 0px">
        <span style="color: blue">var</span> orderdb
= <span style="color: blue">new</span><span style="color: #2b91af">OrderDBDataContext</span>();
</p>
          <p style="margin: 0px">
 
</p>
          <p style="margin: 0px">
        <span style="color: blue">var</span> query 
= <span style="color: blue">from</span> o <span style="color: blue">in</span> orderdb.Orders
</p>
          <p style="margin: 0px">
                     <span style="color: blue">join</span> p <span style="color: blue">in</span> productdb.Products <span style="color: blue">on</span> o.ProductID <span style="color: blue">equals</span> p.ProductID 
</p>
          <p style="margin: 0px">
                     <span style="color: blue">where</span> p.ProductType.ProductTypeName.Contains(
typename )
</p>
          <p style="margin: 0px">
                     <span style="color: blue">select</span> o;
</p>
          <p style="margin: 0px">
 
</p>
          <p style="margin: 0px">
 
</p>
          <p style="margin: 0px">
        <span style="color: blue">return</span> query.ToList();
</p>
          <p style="margin: 0px">
    }
</p>
          <p style="margin: 0px">
    <span style="color: blue">catch</span> ( <span style="color: #2b91af">Exception</span> exception
)
</p>
          <p style="margin: 0px">
    {
</p>
          <p style="margin: 0px">
        <span style="color: #2b91af">Trace</span>.WriteLine(
exception );
</p>
          <p style="margin: 0px">
        <span style="color: blue">throw</span>;
</p>
          <p style="margin: 0px">
    }
</p>
          <p style="margin: 0px">
}
</p>
          <p style="margin: 0px">
 
</p>
        </div>
        <p>
LINQ to SQL is unable to resolve this query, even though both databases sit on the
same server. The compiler will however not warn you not to do this, instead a runtime
exception with message 'The query contains references to items defined on a different
data context.' occurs. 
</p>
        <p>
In a scenario like this the only solution appears to be to write a stored procedure
which can perform the cross database query and use that stored procedure from a data
context.
</p>
      </body>
      <title>LINQ to SQL cross database queries</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,97d1e716-acab-4f4c-98c0-44a2aed22c92.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/10/26/LINQToSQLCrossDatabaseQueries.aspx</link>
      <pubDate>Sun, 26 Oct 2008 10:16:21 GMT</pubDate>
      <description>&lt;p&gt;
After discovering that the LINQ to SQL Designer will only support tables from a single
data source I set out to manually implement a cross database query using two data
contexts.
&lt;/p&gt;
&lt;p&gt;
The result is the following query which joins orders in the OrderDB to products in
the VideoGameStoreDB.
&lt;/p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Order&lt;/span&gt;&amp;gt;
FindOrders( &lt;span style="color: blue"&gt;string&lt;/span&gt; typename )
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
{
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;try&lt;/span&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; productdb
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;VideoGameStoreDBDataContext&lt;/span&gt;();
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; orderdb
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;OrderDBDataContext&lt;/span&gt;();
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; query&amp;nbsp;
= &lt;span style="color: blue"&gt;from&lt;/span&gt; o &lt;span style="color: blue"&gt;in&lt;/span&gt; orderdb.Orders
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;join&lt;/span&gt; p &lt;span style="color: blue"&gt;in&lt;/span&gt; productdb.Products &lt;span style="color: blue"&gt;on&lt;/span&gt; o.ProductID &lt;span style="color: blue"&gt;equals&lt;/span&gt; p.ProductID 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;where&lt;/span&gt; p.ProductType.ProductTypeName.Contains(
typename )
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;select&lt;/span&gt; o;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; query.ToList();
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;catch&lt;/span&gt; ( &lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; exception
)
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Trace&lt;/span&gt;.WriteLine(
exception );
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;throw&lt;/span&gt;;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
}
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
LINQ to SQL is unable to resolve this query, even though both databases sit on the
same server. The compiler will however not warn you not to do this, instead a runtime
exception with message 'The query contains references to items defined on a different
data context.' occurs. 
&lt;/p&gt;
&lt;p&gt;
In a scenario like this the only solution appears to be to write a stored procedure
which can perform the cross database query and use that stored procedure from a data
context.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,97d1e716-acab-4f4c-98c0-44a2aed22c92.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=99e4e87b-c87e-42e4-b5a5-79511684a7d8</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,99e4e87b-c87e-42e4-b5a5-79511684a7d8.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,99e4e87b-c87e-42e4-b5a5-79511684a7d8.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=99e4e87b-c87e-42e4-b5a5-79511684a7d8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The LINQ to SQL Designer supports just one connection, which makes sense since a LINQ
DataContext is scoped to one connection. The designer does offer to change the connection
string for you, but I guess making cross database queries is not possible using the
designer.
</p>
        <p>
The following message is what you get when dragging a table from a second data source
onto the design surface.
</p>
        <p>
          <a href="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLDesignersupportsjustoneconnecti_9263/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="176" alt="image" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLDesignersupportsjustoneconnecti_9263/image_thumb.png" width="490" border="0" />
          </a>
        </p>
      </body>
      <title>LINQ to SQL Designer supports just one connection</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,99e4e87b-c87e-42e4-b5a5-79511684a7d8.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/10/26/LINQToSQLDesignerSupportsJustOneConnection.aspx</link>
      <pubDate>Sun, 26 Oct 2008 09:25:01 GMT</pubDate>
      <description>&lt;p&gt;
The LINQ to SQL Designer supports just one connection, which makes sense since a LINQ
DataContext is scoped to one connection. The designer does offer to change the connection
string for you, but I guess making cross database queries is not possible using the
designer.
&lt;/p&gt;
&lt;p&gt;
The following message is what you get when dragging a table from a second data source
onto the design surface.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLDesignersupportsjustoneconnecti_9263/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="176" alt="image" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLDesignersupportsjustoneconnecti_9263/image_thumb.png" width="490" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,99e4e87b-c87e-42e4-b5a5-79511684a7d8.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=ef960a82-b878-4b80-99ed-77326ccb3f4c</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,ef960a82-b878-4b80-99ed-77326ccb3f4c.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,ef960a82-b878-4b80-99ed-77326ccb3f4c.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ef960a82-b878-4b80-99ed-77326ccb3f4c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just discovered that the LINQ to SQL Designer does not support User Defined Types.
</p>
        <p>
The following message appears when I try and add a table from my database to my design
surface. The Customer table in question has a UDT named 'Point' to specify the GPS
location of the business.
</p>
        <p>
          <a href="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLdoesnotsupportUDTs_90AB/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="163" alt="image" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLdoesnotsupportUDTs_90AB/image_thumb.png" width="491" border="0" />
          </a>
        </p>
      </body>
      <title>LINQ to SQL does not support UDT's</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,ef960a82-b878-4b80-99ed-77326ccb3f4c.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/10/26/LINQToSQLDoesNotSupportUDTs.aspx</link>
      <pubDate>Sun, 26 Oct 2008 09:17:42 GMT</pubDate>
      <description>&lt;p&gt;
I just discovered that the LINQ to SQL Designer does not support User Defined Types.
&lt;/p&gt;
&lt;p&gt;
The following message appears when I try and add a table from my database to my design
surface. The Customer table in question has a UDT named 'Point' to specify the GPS
location of the business.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLdoesnotsupportUDTs_90AB/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="163" alt="image" src="http://www.develop-one.net/blog/content/binary/WindowsLiveWriter/LINQtoSQLdoesnotsupportUDTs_90AB/image_thumb.png" width="491" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,ef960a82-b878-4b80-99ed-77326ccb3f4c.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=2957da09-6b8c-4d8e-8c3f-992c38625394</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,2957da09-6b8c-4d8e-8c3f-992c38625394.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,2957da09-6b8c-4d8e-8c3f-992c38625394.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2957da09-6b8c-4d8e-8c3f-992c38625394</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With LINQ to SQL you can choose to use an external mapping file, allowing you to map
SQL statements to CLR objects (also referred to as POCO, Plain Old CLR Objects). Doing
so means you do not need to adorn your classes with attributes. 
<br />
Here's a little sample of how to do this.
</p>
        <div style="font-size: 10pt; background: white; color: black; font-family: courier new">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">class</span>
            <span style="color: #2b91af">Supplier</span>
          </pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">    <span style="color: blue">public</span><span style="color: blue">int</span> ID
{ <span style="color: blue">get</span>; <span style="color: blue">set</span>; }</pre>
          <pre style="margin: 0px">    <span style="color: blue">public</span><span style="color: blue">string</span> Name
{ <span style="color: blue">get</span>; <span style="color: blue">set</span>; }</pre>
          <pre style="margin: 0px">}</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: #2b91af">List</span>&lt;<span style="color: #2b91af">Supplier</span>&gt;
GetSupplier( <span style="color: blue">string</span> name )</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">    <span style="color: #2b91af">SqlConnection</span> conn
= <span style="color: blue">new</span><span style="color: #2b91af">SqlConnection</span>(
cConnectionString );</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">    <span style="color: #2b91af">XmlMappingSource</span> xms
= <span style="color: #2b91af">XmlMappingSource</span>.FromUrl( <span style="color: #a31515">@"mapping.xml"</span> );</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">    <span style="color: blue">var</span> db
= <span style="color: blue">new</span><span style="color: #2b91af">DataContext</span>(
conn, xms );</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">    <span style="color: #2b91af">Table</span>&lt;<span style="color: #2b91af">Supplier</span>&gt;
Suppliers = db.GetTable&lt;<span style="color: #2b91af">Supplier</span>&gt;();</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">    <span style="color: blue">var</span> query
= <span style="color: blue">from</span> s <span style="color: blue">in</span> Suppliers</pre>
          <pre style="margin: 0px">                <span style="color: blue">where</span> s.Name
== name</pre>
          <pre style="margin: 0px">                <span style="color: blue">select</span> s;</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px">    <span style="color: blue">return</span> query.ToList();</pre>
          <pre style="margin: 0px">}</pre>
          <pre style="margin: 0px"> </pre>
          <pre style="margin: 0px"> </pre>
        </div>
        <p>
The XML can be as simple as:
</p>
        <div style="font-size: 10pt; background: white; color: black; font-family: courier new">
          <pre style="margin: 0px">
            <span style="color: blue">&lt;?</span>
            <span style="color: #a31515">xml</span>
            <span style="color: blue">
            </span>
            <span style="color: red">version</span>
            <span style="color: blue">=</span>"<span style="color: blue">1.0</span>"<span style="color: blue"></span><span style="color: red">encoding</span><span style="color: blue">=</span>"<span style="color: blue">utf-8</span>"<span style="color: blue">?&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue">&lt;</span>
            <span style="color: #a31515">Database</span>
            <span style="color: blue">
            </span>
            <span style="color: red">Name</span>
            <span style="color: blue">=</span>"<span style="color: blue">VideoGameStoreDB</span>"</pre>
          <pre style="margin: 0px">
            <span style="color: blue">          </span>
            <span style="color: red">xmlns</span>
            <span style="color: blue">=</span>"<span style="color: blue">http://schemas.microsoft.com/linqtosql/mapping/2007</span>"<span style="color: blue">&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue"> 
&lt;</span>
            <span style="color: #a31515">Table</span>
            <span style="color: blue">
            </span>
            <span style="color: red">Name</span>
            <span style="color: blue">=</span>"<span style="color: blue">dbo.Supplier</span>"<span style="color: blue"></span><span style="color: red">Member</span><span style="color: blue">=</span>"<span style="color: blue">Supplier</span>"<span style="color: blue">&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue">   
&lt;</span>
            <span style="color: #a31515">Type</span>
            <span style="color: blue">
            </span>
            <span style="color: red">Name</span>
            <span style="color: blue">=</span>"<span style="color: blue">Supplier</span>"<span style="color: blue">&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue">     
&lt;</span>
            <span style="color: #a31515">Column</span>
            <span style="color: blue">
            </span>
            <span style="color: red">Name</span>
            <span style="color: blue">=</span>"<span style="color: blue">SupplierID</span>"<span style="color: blue"></span><span style="color: red">Member</span><span style="color: blue">=</span>"<span style="color: blue">ID</span>"<span style="color: blue"> /&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue">     
&lt;</span>
            <span style="color: #a31515">Column</span>
            <span style="color: blue">
            </span>
            <span style="color: red">Name</span>
            <span style="color: blue">=</span>"<span style="color: blue">SupplierName</span>"<span style="color: blue"></span><span style="color: red">Member</span><span style="color: blue">=</span>"<span style="color: blue">Name</span>"<span style="color: blue"> 
/&gt;</span></pre>
          <pre style="margin: 0px">
            <span style="color: blue">   
&lt;/</span>
            <span style="color: #a31515">Type</span>
            <span style="color: blue">&gt;</span>
          </pre>
          <pre style="margin: 0px">
            <span style="color: blue"> 
&lt;/</span>
            <span style="color: #a31515">Table</span>
            <span style="color: blue">&gt;</span>
          </pre>
          <pre style="margin: 0px">
            <span style="color: blue">&lt;/</span>
            <span style="color: #a31515">Database</span>
            <span style="color: blue">&gt;</span>
          </pre>
          <pre style="margin: 0px">
            <span style="color: blue">
            </span> </pre>
        </div>
        <p>
You can use SQLMetal (a command line tool included with Visual Studio) to generate
a mapping file.
</p>
      </body>
      <title>LINQ to SQL external mapping file</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,2957da09-6b8c-4d8e-8c3f-992c38625394.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/10/25/LINQToSQLExternalMappingFile.aspx</link>
      <pubDate>Sat, 25 Oct 2008 13:27:35 GMT</pubDate>
      <description>&lt;p&gt;
With LINQ to SQL you can choose to use an external mapping file, allowing you to map
SQL statements to CLR objects (also referred to as POCO, Plain Old CLR Objects). Doing
so means you do not need to adorn your classes with attributes. 
&lt;br&gt;
Here's a little sample of how to do this.
&lt;/p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;&lt;pre style="margin: 0px"&gt;&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;Supplier&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;int&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;/pre&gt;&lt;pre style="margin: 0px"&gt;&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;/pre&gt;&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;&amp;gt;
GetSupplier( &lt;span style="color: blue"&gt;string&lt;/span&gt; name )&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;SqlConnection&lt;/span&gt; conn
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;SqlConnection&lt;/span&gt;(
cConnectionString );&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;XmlMappingSource&lt;/span&gt; xms
= &lt;span style="color: #2b91af"&gt;XmlMappingSource&lt;/span&gt;.FromUrl( &lt;span style="color: #a31515"&gt;@"mapping.xml"&lt;/span&gt; );&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; db
= &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DataContext&lt;/span&gt;(
conn, xms );&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Table&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;&amp;gt;
Suppliers = db.GetTable&amp;lt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;var&lt;/span&gt; query
= &lt;span style="color: blue"&gt;from&lt;/span&gt; s &lt;span style="color: blue"&gt;in&lt;/span&gt; Suppliers&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;where&lt;/span&gt; s.Name
== name&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;select&lt;/span&gt; s;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; query.ToList();&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
The XML can be as simple as:
&lt;/p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;&lt;pre style="margin: 0px"&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;/pre&gt;&lt;pre style="margin: 0px"&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;VideoGameStoreDB&lt;/span&gt;"&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;/pre&gt;&lt;pre style="margin: 0px"&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; &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.Supplier&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;Supplier&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&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;Supplier&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&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;SupplierID&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;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&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;SupplierName&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;&amp;nbsp;
/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&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;/pre&gt;&lt;pre style="margin: 0px"&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;/pre&gt;&lt;pre style="margin: 0px"&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;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
You can use SQLMetal (a command line tool included with Visual Studio) to generate
a mapping file.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,2957da09-6b8c-4d8e-8c3f-992c38625394.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=340f6530-80db-453a-bb45-57826dc8ce07</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,340f6530-80db-453a-bb45-57826dc8ce07.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,340f6530-80db-453a-bb45-57826dc8ce07.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=340f6530-80db-453a-bb45-57826dc8ce07</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Okay, so you read the title of this post. Perhaps you're expecting huge amounts of
code, but guess what. As it turns out, this is so ridiculously easy. This will be
a very short post.
</p>
        <p>
Step one is to have a method that loads an RSS feed. WCF offers a new class called
SyndicationFeed.
</p>
        <p>
          <font face="Courier New" size="2">private SyndicationFeed Load( string url )</font>
        </p>
        <p>
          <font face="Courier New" size="2">{</font>
        </p>
        <p>
          <font face="Courier New" size="2">  XmlReader reader = XmlReader.Create( url
);</font>
        </p>
        <p>
          <font face="Courier New" size="2">  SyndicationFeed feed = SyndicationFeed.Load(
reader );</font>
        </p>
        <p>
          <font face="Courier New" size="2">  return feed;</font>
        </p>
        <p>
          <font face="Courier New" size="2">}</font>
        </p>
        <p>
          <font face="Courier New">
          </font>  
</p>
        <p>
The above method will take a url and use to load a feed. Now suppose I have a list
of urls and I want to take all the items in all the feeds, sort them and use them
to generate a new, aggregated feed. Sounds like a fair amount of work, right. 
</p>
        <p>
Here is the code: 
</p>
        <p>
  
</p>
        <p>
          <font face="Courier New" size="2">private SyndicationFeed Aggregate( List&lt;string&gt;
urls )</font>
        </p>
        <p>
          <font face="Courier New" size="2">{</font>
        </p>
        <p>
          <font face="Courier New" size="2">  var items = from url in urls</font>
        </p>
        <p>
          <font face="Courier New" size="2">             
from item in Load( url ).Items</font>
        </p>
        <p>
          <font face="Courier New" size="2">             
orderby item.PublishDate descending</font>
        </p>
        <p>
          <font face="Courier New" size="2">             
select item;</font>
        </p>
        <p>
          <font face="Courier New" size="2">
          </font>  
</p>
        <p>
          <font face="Courier New" size="2">  SyndicationFeed feed = new SyndicationFeed(
items );</font>
        </p>
        <p>
          <font face="Courier New" size="2">  return feed;</font>
        </p>
        <p>
          <font face="Courier New" size="2">}</font>
        </p>
        <p>
 
</p>
        <p>
Cool!
</p>
      </body>
      <title>Building a RSS aggregator using LINQ to Objects and WCF 3.5</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,340f6530-80db-453a-bb45-57826dc8ce07.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/05/09/BuildingARSSAggregatorUsingLINQToObjectsAndWCF35.aspx</link>
      <pubDate>Fri, 09 May 2008 16:10:19 GMT</pubDate>
      <description>&lt;p&gt;
Okay, so you read the title of this post. Perhaps you're expecting huge amounts of
code, but guess what. As it turns out, this is so ridiculously easy. This will be
a very short post.
&lt;/p&gt;
&lt;p&gt;
Step one is to have a method that loads an RSS feed. WCF offers a new class called
SyndicationFeed.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;private SyndicationFeed Load( string url )&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;{&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; XmlReader reader = XmlReader.Create( url
);&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; SyndicationFeed feed = SyndicationFeed.Load(
reader );&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; return feed;&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;}&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;/font&gt;&amp;nbsp; 
&lt;p&gt;
The above method will take a url and use to load a feed. Now suppose I have a list
of urls and I want to take all the items in all the feeds, sort them and use them
to generate a new, aggregated feed. Sounds like a fair amount of work, right. 
&lt;p&gt;
Here is the code: 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;private SyndicationFeed Aggregate( List&amp;lt;string&amp;gt;
urls )&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;{&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; var items = from url in urls&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&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;
from item in Load( url ).Items&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&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;
orderby item.PublishDate descending&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&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;
select item;&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&lt;/font&gt;&amp;nbsp; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; SyndicationFeed feed = new SyndicationFeed(
items );&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;&amp;nbsp; return feed;&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New" size="2"&gt;}&lt;/font&gt; 
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Cool!
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,340f6530-80db-453a-bb45-57826dc8ce07.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=d900a5c0-3b43-425f-8926-9aef51bded2a</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,d900a5c0-3b43-425f-8926-9aef51bded2a.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,d900a5c0-3b43-425f-8926-9aef51bded2a.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d900a5c0-3b43-425f-8926-9aef51bded2a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Maine Developer Network is hosting a Geek Lunch tomorrow at the State of Maine,
Harlow Building at 18 Elkins Ave in Augusta.<br />
Chris Bowen will be presenting on LINQ &amp; Language Improvements in C# 3.0/VB 9.<br />
Sign up <a href="http://www.maine-devnet.org/Home/SignUpForEvent.aspx">here</a>.
</p>
        <p>
LINQ (Language Integrated Query) is a unified approach for querying data using coding
syntax that remains consistent regardless of the data source. It WILL change the way
you work as a developer and architect and this session will help you on your way to
using it effectively. To understand how LINQ works, we'll first navigate the new features
of C# 3.0 and VB 9.0 that enable LINQ functionality. Then, we'll dive into .NET 3.5
and Visual Studio 2008 to explore the various realms of LINQ: Datasets, XML, Database/SQL,
in-memory objects, and more. By the end of this session, you'll have a solid understanding
of how LINQ works and what it can do for your applications. 
</p>
      </body>
      <title>Tomorrow: Geek Lunch (22nd of April) - Introduction to LINQ &amp; Language Improvements in C# 3.0/VB 9</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,d900a5c0-3b43-425f-8926-9aef51bded2a.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/04/21/TomorrowGeekLunch22ndOfAprilIntroductionToLINQLanguageImprovementsInC30VB9.aspx</link>
      <pubDate>Mon, 21 Apr 2008 13:50:10 GMT</pubDate>
      <description>&lt;p&gt;
The Maine Developer Network is hosting a Geek Lunch tomorrow at the State of Maine,
Harlow Building&amp;nbsp;at 18 Elkins Ave in Augusta.&lt;br&gt;
Chris Bowen will be presenting on LINQ &amp;amp; Language Improvements in C# 3.0/VB 9.&lt;br&gt;
Sign up &lt;a href="http://www.maine-devnet.org/Home/SignUpForEvent.aspx"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
LINQ (Language Integrated Query) is a unified approach for querying data using coding
syntax that remains consistent regardless of the data source. It WILL change the way
you work as a developer and architect and this session will help you on your way to
using it effectively. To understand how LINQ works, we'll first navigate the new features
of C# 3.0 and VB 9.0 that enable LINQ functionality. Then, we'll dive into .NET 3.5
and Visual Studio 2008 to explore the various realms of LINQ: Datasets, XML, Database/SQL,
in-memory objects, and more. By the end of this session, you'll have a solid understanding
of how LINQ works and what it can do for your applications. 
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,d900a5c0-3b43-425f-8926-9aef51bded2a.aspx</comments>
      <category>C#</category>
      <category>General</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=184b0afe-133d-4c41-a9c1-6779d4c0015d</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,184b0afe-133d-4c41-a9c1-6779d4c0015d.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,184b0afe-133d-4c41-a9c1-6779d4c0015d.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=184b0afe-133d-4c41-a9c1-6779d4c0015d</wfw:commentRss>
      <title>Learning C# 3.0</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,184b0afe-133d-4c41-a9c1-6779d4c0015d.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/03/27/LearningC30.aspx</link>
      <pubDate>Thu, 27 Mar 2008 17:34:28 GMT</pubDate>
      <description>&lt;p&gt;
Since I was looking at books today anyway I thought I'd research what is available
C# 3.0, I haven't read any of these yet, but check them out:
&lt;/p&gt;
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_6643d773-affb-4a1e-a44d-650a586b3bdf" width="500px" height="175px"&gt;
&lt;param name="movie" value="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fdevelone-20%2F8003%2F6643d773-affb-4a1e-a44d-650a586b3bdf&amp;Operation=GetDisplayTemplate"&gt;
&lt;param name="quality" value="high"&gt;
&lt;param name="bgcolor" value="#FFFFFF"&gt;
&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fdevelone-20%2F8003%2F6643d773-affb-4a1e-a44d-650a586b3bdf&amp;Operation=GetDisplayTemplate" id="Player_6643d773-affb-4a1e-a44d-650a586b3bdf" quality="high" bgcolor="#ffffff" name="Player_6643d773-affb-4a1e-a44d-650a586b3bdf" allowscriptaccess="always" type="application/x-shockwave-flash" align="middle" height="175px" width="500px" /&gt; 
&lt;/object&gt;
&lt;noscript&gt;
&lt;a href="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Fdevelone-20%2F8003%2F6643d773-affb-4a1e-a44d-650a586b3bdf&amp;Operation=NoScript"&gt;Amazon.com
Widgets&lt;/a&gt;
&lt;/noscript&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,184b0afe-133d-4c41-a9c1-6779d4c0015d.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=852f1b64-3ec2-4464-a0f0-830f370459c9</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,852f1b64-3ec2-4464-a0f0-830f370459c9.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,852f1b64-3ec2-4464-a0f0-830f370459c9.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=852f1b64-3ec2-4464-a0f0-830f370459c9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The 22nd of April the <a href="http://www.maine-devnet.org">Maine Developer Network</a> is
organizing a Geek Lunch. We'll be meeting at the State of Maine offices in Augusta
to listen to <a href="http://blogs.msdn.com/cbowen/">Chris Bowen</a> present on LINQ
&amp; Language Improvements in C# 3.0/VB 9.
</p>
        <p>
Pizza will be provided and attendance is free and open for everyone!
</p>
        <p>
More info and RSVP <a href="http://www.maine-devnet.org/Home/">here</a>.
</p>
      </body>
      <title>Join us for a Geek Lunch - Introduction to LINQ &amp; Language Improvements in C# 3.0/VB 9</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,852f1b64-3ec2-4464-a0f0-830f370459c9.aspx</guid>
      <link>http://www.develop-one.net/blog/2008/03/24/JoinUsForAGeekLunchIntroductionToLINQLanguageImprovementsInC30VB9.aspx</link>
      <pubDate>Mon, 24 Mar 2008 16:52:01 GMT</pubDate>
      <description>&lt;p&gt;
The 22nd of April the &lt;a href="http://www.maine-devnet.org"&gt;Maine Developer Network&lt;/a&gt; is
organizing a Geek Lunch. We'll be meeting at the State of Maine offices in Augusta
to listen to &lt;a href="http://blogs.msdn.com/cbowen/"&gt;Chris Bowen&lt;/a&gt; present on LINQ
&amp;amp; Language Improvements in C# 3.0/VB 9.
&lt;/p&gt;
&lt;p&gt;
Pizza will be provided and attendance is free and open for everyone!
&lt;/p&gt;
&lt;p&gt;
More info and RSVP &lt;a href="http://www.maine-devnet.org/Home/"&gt;here&lt;/a&gt;.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,852f1b64-3ec2-4464-a0f0-830f370459c9.aspx</comments>
      <category>C#</category>
      <category>General</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=165ab161-0df0-4a5f-85f9-1ec482c2fcc6</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,165ab161-0df0-4a5f-85f9-1ec482c2fcc6.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,165ab161-0df0-4a5f-85f9-1ec482c2fcc6.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=165ab161-0df0-4a5f-85f9-1ec482c2fcc6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Earlier this year the C# team implemented a change in the design of anonymous types.
It used to be possibly to create an anonymous type and then change a property on the
anonymous type. The code would look like this:
</p>
        <p>
          <font face="Courier New">var x = new { Name = "Mark", Age = 0 };<br />
x.Age = 35;</font>
        </p>
        <p>
In Visual Studio 2008 beta 2 this is however no longer possible since anonymous types
are now immutable. There are apparently good reasons for doing this and <a href="http://blogs.msdn.com/sreekarc/archive/2007/04/03/immutable-the-new-anonymous-type.aspx">Sree
explains it in this post</a> and there is an <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=294257">issue
on MSConnect</a> where Mads from the C# team explains the reasoning. Must say I don't
completely get the reasoning, especially since VB.NET does not have this restriction.
</p>
      </body>
      <title>Anonymous Types are immutable</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,165ab161-0df0-4a5f-85f9-1ec482c2fcc6.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/AnonymousTypesAreImmutable.aspx</link>
      <pubDate>Sun, 11 Nov 2007 16:23:02 GMT</pubDate>
      <description>&lt;p&gt;
Earlier this year the C# team implemented a change in the design of anonymous types.
It used to be possibly to create an anonymous type and then change a property on the
anonymous type. The code would look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;var x = new { Name = "Mark", Age = 0 };&lt;br&gt;
x.Age = 35;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
In Visual Studio 2008 beta 2 this is however no longer possible since anonymous types
are now immutable. There are apparently good reasons for doing this and &lt;a href="http://blogs.msdn.com/sreekarc/archive/2007/04/03/immutable-the-new-anonymous-type.aspx"&gt;Sree
explains it in this post&lt;/a&gt; and there is an &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=294257"&gt;issue
on MSConnect&lt;/a&gt; where Mads from the C# team explains the reasoning. Must say I don't
completely get the reasoning, especially since VB.NET does not have this restriction.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,165ab161-0df0-4a5f-85f9-1ec482c2fcc6.aspx</comments>
      <category>C#</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=d8fce583-c18f-436f-9d88-c5c660aa7aa1</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,d8fce583-c18f-436f-9d88-c5c660aa7aa1.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,d8fce583-c18f-436f-9d88-c5c660aa7aa1.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d8fce583-c18f-436f-9d88-c5c660aa7aa1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The website <a href="http://www.hookedonlinq.com">www.hookedonlinq.com</a> has an
excellent article explaining the basics of LINQ to SQL. It's called <a href="http://www.hookedonlinq.com/LINQtoSQL5MinuteOverview.ashx">LINQ
to SQL - 5 minute overview</a>.
</p>
      </body>
      <title>LINQ to SQL - 5 minute overview</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,d8fce583-c18f-436f-9d88-c5c660aa7aa1.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/LINQToSQL5MinuteOverview.aspx</link>
      <pubDate>Sun, 11 Nov 2007 15:47:56 GMT</pubDate>
      <description>&lt;p&gt;
The website &lt;a href="http://www.hookedonlinq.com"&gt;www.hookedonlinq.com&lt;/a&gt; has an
excellent article explaining the basics of LINQ to SQL. It's called &lt;a href="http://www.hookedonlinq.com/LINQtoSQL5MinuteOverview.ashx"&gt;LINQ
to SQL - 5 minute overview&lt;/a&gt;.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,d8fce583-c18f-436f-9d88-c5c660aa7aa1.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=572a557e-fd83-41c9-ba30-0947557ffafb</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,572a557e-fd83-41c9-ba30-0947557ffafb.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,572a557e-fd83-41c9-ba30-0947557ffafb.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=572a557e-fd83-41c9-ba30-0947557ffafb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you want to join data which is in a list with data that is in the database, then
you need to use the 'Contains' operation.
</p>
        <p>
The code below shows that we have a list containing two values, next we want to join
this list with some data in the database. This data has an Id and an Description.<br />
You might be tempted to use the join operator, but that will fail, instead, call the
Contains() method. 
</p>
        <p>
          <font face="Courier New">static void Main(string[] args)<br />
{<br />
    List&lt;int&gt; l = new List&lt;int&gt;();<br />
    l.Add(1);<br />
    l.Add(2);</font>
        </p>
        <p>
          <font face="Courier New">    CustomerInfoDBDataContext db = new CustomerInfoDBDataContext();<br />
    var result = from pi in db.PersonalInfos<br />
                
where l.Contains(pi.Id)<br />
                
select pi.Id + " - " + pi.Description;</font>
        </p>
        <p>
          <font face="Courier New">    foreach (var info in result)<br />
    {<br />
        Console.WriteLine(info);<br />
    }<br />
    Console.ReadLine();<br />
}</font>
        </p>
      </body>
      <title>LINQ to SQL: Joining database data with non-database data</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,572a557e-fd83-41c9-ba30-0947557ffafb.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/LINQToSQLJoiningDatabaseDataWithNondatabaseData.aspx</link>
      <pubDate>Sun, 11 Nov 2007 15:39:03 GMT</pubDate>
      <description>&lt;p&gt;
If you want to join data which is in a list with data that is in the database, then
you need to use the 'Contains' operation.
&lt;/p&gt;
&lt;p&gt;
The code below shows that we have a list containing two values, next we want to join
this list with some data in the database. This data has an Id and an Description.&lt;br&gt;
You might be tempted to use the join operator, but that will fail, instead, call the
Contains() method. 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;static void Main(string[] args)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;int&amp;gt; l = new List&amp;lt;int&amp;gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; l.Add(1);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; l.Add(2);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerInfoDBDataContext db = new CustomerInfoDBDataContext();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var result = from pi in db.PersonalInfos&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;
where l.Contains(pi.Id)&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;
select pi.Id + " - " + pi.Description;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (var info in result)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(info);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine();&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,572a557e-fd83-41c9-ba30-0947557ffafb.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=bdb5508e-b1f7-4937-ad84-dda3f1bb3406</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,bdb5508e-b1f7-4937-ad84-dda3f1bb3406.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,bdb5508e-b1f7-4937-ad84-dda3f1bb3406.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bdb5508e-b1f7-4937-ad84-dda3f1bb3406</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Niels confirmed it for me. Yes, it is possible to run a LINQ to SQL query in SQL Server
2008 using a .NET managed stored procedure.
</p>
        <p>
As he puts it: "<em><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2392978&amp;SiteID=1&amp;mode=1">yes
you can - but as soon there are any transactions invloved things will go pear-shaped</a></em>".
</p>
        <p>
Note that there will also be an optimized <a href="http://209.85.129.104/search?q=cache:HvUYJbb9cFkJ:download.microsoft.com/download/a/c/d/acd8e043-d69b-4f09-bc9e-4168b65aaa71/SQL2008_ProductOverview.doc">LINQ
to SQL provider as part of SQL Server 2008</a>:
</p>
        <p>
"<em>Language Integrated Query (LINQ) enables developers to issue queries against
data by using a managed programming language such as C# or Visual Basic.NET, instead
of SQL statements. LINQ enables seamless, strongly typed, set-oriented queries written
in .NET Framework languages to run against ADO.NET (LINQ to SQL), ADO.NET DataSets
(LINQ to DataSets), the ADO.NET Entity Framework (LINQ to Entities), and to the Entity
Data Service Mapping Provider. SQL Server<font face="Arial" size="2"> </font><font face="Verdana" size="2">2008
features a new LINQ to SQL Provider that enables developers to use LINQ directly on
SQL Server</font><font face="Arial" size="2"> </font><font face="Verdana" size="2">2008
tables and columns.</font></em>" 
</p>
      </body>
      <title>LINQ to SQL query inside SQL Server 2008</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,bdb5508e-b1f7-4937-ad84-dda3f1bb3406.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/LINQToSQLQueryInsideSQLServer2008.aspx</link>
      <pubDate>Sun, 11 Nov 2007 13:01:04 GMT</pubDate>
      <description>&lt;p&gt;
Niels confirmed it for me. Yes, it is possible to run a LINQ to SQL query in SQL Server
2008 using a .NET managed stored procedure.
&lt;/p&gt;
&lt;p&gt;
As he puts it: "&lt;em&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2392978&amp;amp;SiteID=1&amp;amp;mode=1"&gt;yes
you can - but as soon there are any transactions invloved things will go pear-shaped&lt;/a&gt;&lt;/em&gt;".
&lt;/p&gt;
&lt;p&gt;
Note that there will also be an optimized &lt;a href="http://209.85.129.104/search?q=cache:HvUYJbb9cFkJ:download.microsoft.com/download/a/c/d/acd8e043-d69b-4f09-bc9e-4168b65aaa71/SQL2008_ProductOverview.doc"&gt;LINQ
to SQL provider as part of SQL Server 2008&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
"&lt;em&gt;Language Integrated Query (LINQ) enables developers to issue queries against
data by using a managed programming language such as C# or Visual Basic.NET, instead
of SQL statements. LINQ enables seamless, strongly typed, set-oriented queries written
in .NET Framework languages to run against ADO.NET (LINQ to SQL), ADO.NET DataSets
(LINQ to DataSets), the ADO.NET Entity Framework (LINQ to Entities), and to the Entity
Data Service Mapping Provider. SQL Server&lt;font face=Arial size=2&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=Verdana size=2&gt;2008
features a new LINQ to SQL Provider that enables developers to use LINQ directly on
SQL Server&lt;/font&gt;&lt;font face=Arial size=2&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=Verdana size=2&gt;2008
tables and columns.&lt;/font&gt;&lt;/em&gt;" 
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,bdb5508e-b1f7-4937-ad84-dda3f1bb3406.aspx</comments>
      <category>LINQ</category>
      <category>SQL</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=fafc0c55-21b2-4fbd-b62c-49f1af26aa67</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,fafc0c55-21b2-4fbd-b62c-49f1af26aa67.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,fafc0c55-21b2-4fbd-b62c-49f1af26aa67.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fafc0c55-21b2-4fbd-b62c-49f1af26aa67</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday I spoke at the <a href="http://www.isdc.ro">iSDC</a> and <a href="http://www.ronua.ro">Ronua</a> Community
Workshop. We had a great day and it was a pleasure meeting the people at iSDC, meeting
the developers in Cluj and surroundings (some drove over 200km to make it to the meeting)
and Petru Jucovschi (the DPE for Microsoft Romania).
</p>
        <p>
Here are the two presentations that I did:
</p>
        <p>
          <a href="http://www.develop-one.net/home/downloads/iSDC/11-09-2007%20-%20Developing%20Windows%20Vista%20gadgets.pptx">11-09-2007
- Developing Windows Vista gadgets.pptx (431.43 KB)</a>
        </p>
        <p>
          <a href="http://www.develop-one.net/home/downloads/iSDC/11-10-2007%20-%202008.NET.pptx">11-10-2007
- 2008.NET.pptx (252.91 KB)</a>
        </p>
        <p>
In the Visual Studio 2008 presentation I also talked about the work I've done for
AOL. The AOL developer site can be found at <a href="http://dev.aol.com">http://dev.aol.com</a> and
for more reference material on Vista gadgets you can visit my <a href="http://dev.aol.com/blog/22109">AOL
blog</a>.
</p>
      </body>
      <title>iSDC &amp; RONUA Community Workshop</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,fafc0c55-21b2-4fbd-b62c-49f1af26aa67.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/iSDCRONUACommunityWorkshop.aspx</link>
      <pubDate>Sun, 11 Nov 2007 08:32:20 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday I spoke at the &lt;a href="http://www.isdc.ro"&gt;iSDC&lt;/a&gt; and &lt;a href="http://www.ronua.ro"&gt;Ronua&lt;/a&gt; Community
Workshop. We had a great day and it was a pleasure meeting the people at iSDC, meeting
the developers in Cluj and surroundings (some drove over 200km to make it to the meeting)
and Petru Jucovschi (the DPE for Microsoft Romania).
&lt;/p&gt;
&lt;p&gt;
Here are the two presentations that I did:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.develop-one.net/home/downloads/iSDC/11-09-2007%20-%20Developing%20Windows%20Vista%20gadgets.pptx"&gt;11-09-2007
- Developing Windows Vista gadgets.pptx (431.43 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.develop-one.net/home/downloads/iSDC/11-10-2007%20-%202008.NET.pptx"&gt;11-10-2007
- 2008.NET.pptx (252.91 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the Visual Studio 2008 presentation I also talked about the work I've done for
AOL. The AOL developer site can be found at &lt;a href="http://dev.aol.com"&gt;http://dev.aol.com&lt;/a&gt; and
for more reference material on Vista gadgets you can visit my &lt;a href="http://dev.aol.com/blog/22109"&gt;AOL
blog&lt;/a&gt;.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,fafc0c55-21b2-4fbd-b62c-49f1af26aa67.aspx</comments>
      <category>C#</category>
      <category>General</category>
      <category>LINQ</category>
      <category>Vista</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=d1a58068-da11-42e6-a60a-09793f2815e8</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,d1a58068-da11-42e6-a60a-09793f2815e8.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,d1a58068-da11-42e6-a60a-09793f2815e8.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d1a58068-da11-42e6-a60a-09793f2815e8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
During my session yesterday at the iSDC and RONUA Community Workshop I received a
question on how to do a group by together with calculating the sum of the group.
</p>
        <p>
I couldn't remember the right syntax and had to go and look it up. There is actually
a sample included on the <a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx">101
Linq Samples page</a> (thanks Dragos!).
</p>
        <p>
The query looks like this:
</p>
        <p>
          <font face="Courier New">public void Linq80() { 
<br />
   List products = </font>
          <a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336753.aspx">
            <font face="Courier New">GetProductList();</font>
          </a>
          <br />
          <br />
          <font face="Courier New">   var categories = 
<br />
      from p in products 
<br />
      group p by p.Category into g 
<br />
      select new {Category = g.Key, TotalUnitsInStock
= g.Group.Sum(p =&gt; p.UnitsInStock)}; 
<br /><br />
   ObjectDumper.Write(categories); 
<br />
}</font>
        </p>
      </body>
      <title>LINQ: Sum and Group By</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,d1a58068-da11-42e6-a60a-09793f2815e8.aspx</guid>
      <link>http://www.develop-one.net/blog/2007/11/11/LINQSumAndGroupBy.aspx</link>
      <pubDate>Sun, 11 Nov 2007 08:14:02 GMT</pubDate>
      <description>&lt;p&gt;
During my session yesterday at the iSDC and RONUA Community Workshop I received a
question on how to do a group by together with calculating the sum of the group.
&lt;/p&gt;
&lt;p&gt;
I couldn't remember the right syntax and had to go and look it up. There is actually
a sample included on the &lt;a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx"&gt;101
Linq Samples page&lt;/a&gt; (thanks Dragos!).
&lt;/p&gt;
&lt;p&gt;
The query looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public void Linq80() { 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;List products = &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336753.aspx"&gt;&lt;font face="Courier New"&gt;GetProductList();&lt;/font&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var categories = 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;from p in products 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;group p by p.Category into g 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select new {Category = g.Key, TotalUnitsInStock
= g.Group.Sum(p =&amp;gt; p.UnitsInStock)}; 
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ObjectDumper.Write(categories); 
&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,d1a58068-da11-42e6-a60a-09793f2815e8.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=3d7b4b28-13a6-43e4-892b-390764a7cbef</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,3d7b4b28-13a6-43e4-892b-390764a7cbef.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,3d7b4b28-13a6-43e4-892b-390764a7cbef.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3d7b4b28-13a6-43e4-892b-390764a7cbef</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Follow this <a href="http://www.microsoft.com/downloads/details.aspx?familyid=f3746a0b-6057-46b0-8ab5-8ac272cc47e0&amp;displaylang=en#filelist">link</a> to
view the recent episode of MSDN TV where they discuss LINQ for VB.NET.
</p>
        <p>
          <strong>Overview<br /></strong>
          <span>Visual Basic 9.0 will offer radical improvements in its ability to
work with data in all its forms: as objects, as XML, and as relational data. Paul
Vick and Amanda Silver discuss the latest Customer Tech Preview of the next version
of Visual Basic to hit the Web. It includes support for DLinq (language integrated
query over relational data) and expanded editor support for query statements and integrated
XML.</span>
        </p>
      </body>
      <title>LINQ on MSDN TV</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,3d7b4b28-13a6-43e4-892b-390764a7cbef.aspx</guid>
      <link>http://www.develop-one.net/blog/2006/01/19/LINQOnMSDNTV.aspx</link>
      <pubDate>Thu, 19 Jan 2006 07:09:50 GMT</pubDate>
      <description>&lt;p&gt;
Follow this &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=f3746a0b-6057-46b0-8ab5-8ac272cc47e0&amp;amp;displaylang=en#filelist"&gt;link&lt;/a&gt;&amp;nbsp;to
view the recent episode of MSDN TV where they discuss LINQ for VB.NET.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Overview&lt;br&gt;
&lt;/strong&gt;&lt;span&gt;Visual Basic 9.0 will offer radical improvements in its ability to
work with data in all its forms: as objects, as XML, and as relational data. Paul
Vick and Amanda Silver discuss the latest Customer Tech Preview of the next version
of Visual Basic to hit the Web. It includes support for DLinq (language integrated
query over relational data) and expanded editor support for query statements and integrated
XML.&lt;/span&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,3d7b4b28-13a6-43e4-892b-390764a7cbef.aspx</comments>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=357eb20c-ab31-45a1-9362-b819432ee97d</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,357eb20c-ab31-45a1-9362-b819432ee97d.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,357eb20c-ab31-45a1-9362-b819432ee97d.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=357eb20c-ab31-45a1-9362-b819432ee97d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a couple of links to stuff that's in beta right now:
</p>
        <p>
          <a href="http://msdn.microsoft.com/windowsvista/">WinFX, XAML and SDK </a>
          <br />
          <a href="http://atlas.asp.net/">ASP.NET ATLAS </a>
          <br />
          <a href="http://msdn.microsoft.com/vcsharp/future/default.aspx">C# and LINQ </a>
          <br />
          <a href="http://msdn.microsoft.com/vbasic/Future/default.aspx">VB.NET and LINQ</a>
        </p>
      </body>
      <title>What's coming in 2006</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,357eb20c-ab31-45a1-9362-b819432ee97d.aspx</guid>
      <link>http://www.develop-one.net/blog/2006/01/14/WhatsComingIn2006.aspx</link>
      <pubDate>Sat, 14 Jan 2006 15:37:48 GMT</pubDate>
      <description>&lt;p&gt;
Just a couple of links to stuff that's in beta right now:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/windowsvista/"&gt;WinFX, XAML and SDK &lt;/a&gt;
&lt;br&gt;
&lt;a href="http://atlas.asp.net/"&gt;ASP.NET ATLAS &lt;/a&gt;
&lt;br&gt;
&lt;a href="http://msdn.microsoft.com/vcsharp/future/default.aspx"&gt;C# and LINQ &lt;/a&gt;
&lt;br&gt;
&lt;a href="http://msdn.microsoft.com/vbasic/Future/default.aspx"&gt;VB.NET and LINQ&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,357eb20c-ab31-45a1-9362-b819432ee97d.aspx</comments>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>LINQ</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.develop-one.net/blog/Trackback.aspx?guid=f7505dd3-e275-4fc4-8981-c284790047b0</trackback:ping>
      <pingback:server>http://www.develop-one.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.develop-one.net/blog/PermaLink,guid,f7505dd3-e275-4fc4-8981-c284790047b0.aspx</pingback:target>
      <dc:creator>Mark Blomsma</dc:creator>
      <wfw:comment>http://www.develop-one.net/blog/CommentView,guid,f7505dd3-e275-4fc4-8981-c284790047b0.aspx</wfw:comment>
      <wfw:commentRss>http://www.develop-one.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f7505dd3-e275-4fc4-8981-c284790047b0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm finally catching up on some reading that I've been meaning to do.
</p>
        <p>
Right now I'm reading 'Programming Windows Presentation Foundation' by Chris Sells
&amp; Ian Griffiths. Good read and I hope to finish it on my next flight :-)
</p>
        <p>
Also spend some time this morning reading an article by Ted Neward on MSDN (<a href="http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dndotnet/html/linqcomparisons.asp">http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dndotnet/html/linqcomparisons.asp</a>)
which gives food for thought on LINQ and the whole OR-mapping issue.
</p>
      </body>
      <title>Reading...</title>
      <guid isPermaLink="false">http://www.develop-one.net/blog/PermaLink,guid,f7505dd3-e275-4fc4-8981-c284790047b0.aspx</guid>
      <link>http://www.develop-one.net/blog/2006/01/14/Reading.aspx</link>
      <pubDate>Sat, 14 Jan 2006 15:13:48 GMT</pubDate>
      <description>&lt;p&gt;
I'm finally catching up on some reading that I've been meaning to do.
&lt;/p&gt;
&lt;p&gt;
Right now I'm reading 'Programming Windows Presentation Foundation' by Chris Sells
&amp;amp; Ian Griffiths. Good read and I hope to finish it on my next flight :-)
&lt;/p&gt;
&lt;p&gt;
Also spend some time this morning reading an article by Ted Neward on MSDN (&lt;a href="http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dndotnet/html/linqcomparisons.asp"&gt;http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dndotnet/html/linqcomparisons.asp&lt;/a&gt;)
which gives food for thought on LINQ and the whole OR-mapping issue.
&lt;/p&gt;</description>
      <comments>http://www.develop-one.net/blog/CommentView,guid,f7505dd3-e275-4fc4-8981-c284790047b0.aspx</comments>
      <category>LINQ</category>
      <category>WPF</category>
    </item>
  </channel>
</rss>