<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>pushbomb &#187; nhibernate</title>
	<atom:link href="http://team.pushbomb.com/category/concepts-implemented/nhibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://team.pushbomb.com</link>
	<description>tv programmed by the collective</description>
	<lastBuildDate>Tue, 05 Jan 2010 22:49:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='team.pushbomb.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a08732ed34e6814d5a5513fe8cde5696?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>pushbomb &#187; nhibernate</title>
		<link>http://team.pushbomb.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://team.pushbomb.com/osd.xml" title="pushbomb" />
	<atom:link rel='hub' href='http://team.pushbomb.com/?pushpress=hub'/>
		<item>
		<title>NHibernate Profiler from Ayende : Maturity in ORM is here</title>
		<link>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/</link>
		<comments>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 07:31:13 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Domain Driven]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>
		<category><![CDATA[NHibernate Profiler]]></category>
		<category><![CDATA[SQL Profiler]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/</guid>
		<description><![CDATA[The always astoundingly good Ayende (Oren) is getting ready to release one of the most compelling software tools for people doing far less work with far higher quality by using NHibernate.  For the last two years or so I keep thinking ‘soon’ I can just assume teams will understand the facts around ORM and I continue to be astounded at the waste I encounter instead.





That MS SQL Certification is hard to let go I realize but is it worth acting like Sisyphus for? I have more interesting things to do and I KNOW your stakeholders are not cool with you wasting their money.





I simply mean you can think, talk, brainstorm etc. with your ‘domain experts’ without the silly attempt to handle two different systems (Relational and OO) of thought. You all share one. And you should know it. It’s called object oriented.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1109&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:right;">Stop</p>
<p style="text-align:right;">Writing.</p>
<p style="text-align:right;">Data</p>
<p style="text-align:right;">Access</p>
<p style="text-align:right;">Code</p>
<p>That MS SQL Certification is hard to let go I realize but is it worth acting like <a target="_blank" href="http://en.wikipedia.org/wiki/Sisyphus_">Sisyphus </a><a target="_blank" href="http://en.wikipedia.org/wiki/Sysphus_"></a>for? I have more interesting things to do and <strong>I KNOW your stakeholders are not cool with you wasting their money.</strong></p>
<p><strong></strong></p>
<p><a href="http://en.wikipedia.org/wiki/Image:Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg"><img style="display:inline;margin:10px 0 10px 25px;" border="0" alt="" align="right" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg/280px-Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg" width="233" height="240" /></a></p>
<p>I simply mean you can think, talk, brainstorm etc. with your ‘domain experts’ without the silly attempt to handle two different systems (Relational and OO) of thought. You all share one. And you should know it. It’s called object oriented.</p>
<p>Anyway… Enough pithiness (is that a word?)…</p>
<p>The always astoundingly good <a target="_blank" href="http://www.ayende.com">Ayende</a> (Oren) is getting ready to release one of the most compelling software tools for people wasting far less and ‘for free’ gaining far higher quality by using NHibernate.</p>
<p>I expect it will be a fantastic tool to use in trying to work with teams desperately clutching their ADO.NET books….</p>
<p><a href="http://ayende.com/">This is all his content from here out:</a></p>
<p>NH Prof has reached the level in which I can actually talk about the features that it has in more than abstract terms. There is still a big feature area that I want to cover (which should be a nice surprise), but the basics are there, and today I had ample proof that it is maturing just nicely. I was able to deal with quite a few of the remaining tasks by applying check listing. Basically, to do X, I had to do A,B &amp; C. Trivially simple, and quite satisfying.</p>
<p>Test coverage went back up to over 90% on the backend again, which is also nice.</p>
<p>Anyway, let us start with the tour, shall we?</p>
<p><a href="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_2.png" width="655" height="557" /></a></p>
<p>The left upper pane shows the captured sessions. You can see the number of statements per each session, as well as the length time it was open.&#160; Let us move down a bit, and explore statistics.</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_8.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_3.png" width="655" height="557" /></a></p>
<p>The session factory statistics pane include a <em>lot</em> of information about NHibernate, which can give you a good indication about what is going on in the application in a global fashion. In 2.0 we have quite a few data points, but the statistics feature was significantly expanded in 2.1, and contains a lot more data and more finely grained statistics.</p>
<p>But that is probably not what gets you excited. What is likely to thrill you are the statement view.</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_12.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_5.png" width="748" height="495" /></a></p>
<p>I put a lot of though into designing those (well, into thinking about them, the actual design was handled by people who actually know what they are doing, design wise). The upper section of the screen is optimized to allow the human eye to quickly scan it in order to find all sorts of interesting patterns. Compare this to SQL Profiler UI, and you can see why I think that this is a much better version, just from that stand point.</p>
<p>The bottom half, however, is what I <em>really</em> like. This is the part I use the most often, in order to really see what is going on. I did an ad-hoc demo of the profiler in Dallas, and one of the things that cam out of this was the format that you see on the lower pane. This UI is set to allow you to just copy the query from the profiler and immediately execute a readable, easy to understand query on Management Studio or Toad. Again, another piece where I think that I providing a lot more value than SQL Profiler does.</p>
<p>For quick reference, we put the parameter values on the left of the query, so you can inspect them without having to go into a potentially complex queries to try to figure out what is what.</p>
<p>But this isn&#8217;t where it ends, let us take a look at the stack trace tab:</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_16.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_7.png" width="751" height="504" /></a></p>
<p>The stack trace will let you correlate a query and the code that generated it, and not only that, it will take you directly from the query to the code (opening visual studio, loading the file and landing you directly in the place in the code that caused this query to be executed.</p>
<p>Oh, and one more thing&#8230;</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_18.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_8.png" width="764" height="538" /></a></p>
<p>I have over four years of experience working with NHibernate, a time during which I learned quite a bit about what work, what doesn&#8217;t and what kind of things we should be aware off. The profiler has given me the chance to codify a lot of these patterns, and put them in a way that allow you to have apply early detection and prevention mechanisms.</p>
<p>And one last thing, this time it will really be the last. Session / Entity inspection:</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_20.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_9.png" width="749" height="527" /></a></p>
<p>You can see exactly what are the entities that were loaded by this session, including counts per entity and all the ids that were loaded.</p>
<p>I hope to be able to open it for beta testing in two to three weeks, and a 1.0 release about a month after that. Pricing is tentatively set at 200$ per user, but this is subject to change.</p>
<p><a title="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx" href="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx">http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx</a></p>
<h3>Amazing stuff……Buy this from Oren!</h3>
<br />Posted in Framework Design, Industry News, nhibernate, ORM, Software Futures Tagged: ADO.NET, C#, C# 3.0, Domain, Domain Driven, Linq, Linq to Entities, nhibernate, NHibernate Profiler, ORM, SQL Profiler <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1109&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg/280px-Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg" medium="image" />

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Expose New Linq Operations from the Screaming HashSet&lt;T&gt; Collection</title>
		<link>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/</link>
		<comments>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 01:36:20 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[HashSet]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to NHibernate]]></category>
		<category><![CDATA[Linq Undocumented]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/</guid>
		<description><![CDATA[Linq is not just about databases. It’s about reading the registry, your hard-disk, or even a list of function pointers to be invoked. Linq is about more event then sets (collections). It’s about making tasks easier in many cases and vastly more powerful (and most importantly your code more readable and maintainable at the same time).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=874&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><a target="_blank" href="http://en.wikipedia.org/wiki/Language_Integrated_Query">Linq</a> is not just about databases. It’s about reading the registry, your hard-disk, or even a list of function pointers to be invoked. Linq is about more even then sets (collections). It’s about making tasks easier in many cases and vastly more powerful (and most importantly your code more readable and maintainable at the same time).     <br /><a href="http://dcarr.files.wordpress.com/2008/09/premature-6.jpg"><img style="border-width:0;margin:0 0 15px 20px;" title="premature_optimization" border="0" alt="premature_optimization" align="right" src="http://dcarr.files.wordpress.com/2008/09/premature-6-thumb.jpg?w=244&#038;h=181" width="244" height="181" /></a></p>
<blockquote><h3>It’s astounding just how fast the <a target="_blank" href="http://msdn.microsoft.com/en-us/library/bb397727.aspx">HashSet&lt;T&gt;</a> collection is.</h3>
</blockquote>
<p>This post will show how to gain additional power that is fully supported from Microsoft which is often overlooked, yet it can solve some of the hardest problems (especially around performance however don’t prematurely optimize!).</p>
<p>&#160; <br />There are tons of cases where we need a real powerhouse to manage super-large sets (in this example we will use the registry). An entire part of the registry actually. </p>
<p>Here is the API we want to use to query the HKLM part of our registry:</p>
<pre class="code"><span style="background:black;color:white;">            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">FindFontsColors = </span><span style="background:black;color:#ecc03e;">from </span><span style="background:black;color:white;">rk </span><span style="background:black;color:#ecc03e;">in </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Hklm
                                  </span><span style="background:black;color:#ecc03e;">where
                                          </span><span style="background:black;color:white;">rk.Name.Contains(</span><span style="background:black;color:#ecc03e;">&quot;VisualStudio&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.Name.EndsWith(</span><span style="background:black;color:#ecc03e;">&quot;FontsAndColors&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.ValueCount &gt; 0

                                  </span><span style="background:black;color:#ecc03e;">select </span><span style="background:black;color:white;">rk.Name;

</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<ul>
  </ul>
<ul>
<li>
<div align="left">The core win here is &#8216;ease of development and maintenance’ without the typical trade-off<br />
        <br />in performance. The entire equation is shifted actually so the tradeoff becomes irrelevant. </div>
</li>
<li>
<div align="left">Sure you could do this with a lot more code perhaps even a few ms faster. But at what real cost over the life of your code?</div>
</li>
<li>
<div align="left">The entire point of this post is the far greater win in maintenance and ease of understanding, without the assumed loss of things like performance.</div>
</li>
</ul>
<p>&#160;</p>
<p>When there is no intelligence available on a ‘back-end’ to parse your requests, yet you need the power of finding complex conditional results and much more, there is one recently introduced superstar that is often not described in terms of Linq:</p>
<h2>HashSet&lt;T&gt;</h2>
<p>Let’s start with some code. You know you can call ToList, ToArray, ToDictionary &amp; ToLookup on your collections (we’ll call them Sequences to stay in line with Linq terms).</p>
<ul>
<li>
<div align="right">You will see ‘sets’, ‘collections’ &amp; sequences used together in documentation today. The differences are mostly academic, however the HashSet does illustrate some of those semantic differences which we point out.</div>
</li>
</ul>
<p>We are going to add an extension method to provide us a ToHashSet capability off any IEnumerable&lt;T&gt; (in exactly the same implementation style Microsoft used internally).</p>
<p>Here is how we gain access to this type in the easiest way:</p>
<pre class="code"><span style="background:black;color:white;">    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections.Generic;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">This extension method class will add a ToHashSet</span><span style="background:black;color:gray;">&lt;typeparamref name=</span><span style="background:black;color:#9feca5;">&quot;&gt;&quot;</span><span style="background:black;color:gray;">/&gt;
    /// </span><span style="background:black;color:#9ff5fd;">in exactly the same way it is provided by the others:
    </span><span style="background:black;color:gray;">///
    /// </span><span style="background:black;color:#9ff5fd;">ToList(), ToArray(), ToDictionary().. Now ToHashSet() is available
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public static class </span><span style="background:black;color:#2b91af;">HashSetLinqAccess
    </span><span style="background:black;color:white;">{
        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt; ToHashSet&lt;T&gt;(</span><span style="background:black;color:#ecc03e;">this </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;T&gt; fromEnumerable,
            </span><span style="background:black;color:#9185fa;">IEqualityComparer</span><span style="background:black;color:white;">&lt;T&gt; comparer)
        {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(fromEnumerable == </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">ArgumentNullException</span><span style="background:black;color:white;">(</span><span style="background:black;color:#ecc03e;">&quot;fromEnumerable&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(comparer == </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                comparer = </span><span style="background:black;color:#2b91af;">EqualityComparer</span><span style="background:black;color:white;">&lt;T&gt;.Default;

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">!</span><span style="background:black;color:#ecc03e;">typeof</span><span style="background:black;color:white;">(</span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;).IsAssignableFrom(fromEnumerable.GetType())
                           ? </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;(fromEnumerable, comparer)
                           : (</span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;)fromEnumerable;
        }

        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt; ToHashSet&lt;T&gt;(</span><span style="background:black;color:#ecc03e;">this </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;T&gt; fromEnumerable) {

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">ToHashSet(fromEnumerable, </span><span style="background:black;color:#2b91af;">EqualityComparer</span><span style="background:black;color:white;">&lt;T&gt;.Default);
        }
    }</span></pre>
<p>Ok so what are we going to do with the HashSet&lt;T&gt; and why?</p>
<p>The benefit comes when we have in-memory large sequences to deal with. I will be using the following code as the ‘server’ here. This is code that provides a ‘Registry Server’ to our application. We will populate up a HashSet&lt;T&gt; with RegistryKey instances and then see just how fast it is.</p>
<p>In the next post we will cover all of the additional methods the HashSet&lt;T&gt; exposes. </p>
<p>Here is the code for our Registry Server. NOTE: Please do not try to modify this to change your registry unless you know what you are doing. This is an immutable (read-only) projection from the registry for a very good reason: You can thrash your machine otherwise.</p>
<p>&#160;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections.Generic;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Linq;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Runtime.CompilerServices;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Threading;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Castle.Core;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">LinqToCore;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Microsoft.Win32;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">Provider immutable projections from the registry
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">of the machine, as well as events for status and errors
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">via a singeton wrapper on the .NET Registry
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">singleton.
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">Here we are only exposing the HKLM area
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">subkey but you can see it is easily extensible
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">: </span><span style="background:black;color:#9185fa;">IEqualityComparer</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt;, </span><span style="background:black;color:#9185fa;">IInitializable</span><span style="background:black;color:white;">,
                                  </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; {
        </span><span style="background:black;color:#f5f01f;">// IInitializable is from Castle.Core Contractually
        // saying we need a call on our Initialize() method
        // before we can be given out as a service to
        // others

        </span><span style="background:black;color:#ecc03e;">private static readonly </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">_instance;
        </span><span style="background:black;color:#ecc03e;">private static int </span><span style="background:black;color:white;">iCounter;
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; allKeys;
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">eventArgStatus;
        </span><span style="background:black;color:#ecc03e;">private bool </span><span style="background:black;color:white;">isInitialized;
</span></pre>
<pre class="code"><span style="background:black;color:white;">        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError </span><span style="background:black;color:white;">populateError = </span><span style="background:black;color:#ecc03e;">delegate </span><span style="background:black;color:white;">{ };
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate </span><span style="background:black;color:white;">populateEventOk = </span><span style="background:black;color:#ecc03e;">delegate </span><span style="background:black;color:white;">{ };</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:white;">
        </span><span style="background:black;color:#ecc03e;">static </span><span style="background:black;color:white;">RegistryServer() {
          </span></pre>
<pre class="code"><span style="background:black;color:white;">            _instance = </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">RegistryServer
            </span><span style="background:black;color:white;">{eventArgStatus = </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs</span><span style="background:black;color:white;">()};</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:white;"></span><span style="background:black;color:white;">        }

        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:white;">RegistryServer() {}

        </span><span style="background:black;color:#ecc03e;">public static long </span><span style="background:black;color:white;">Count {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!_instance.isInitialized)
                    </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                            </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

                </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_instance.allKeys.Count;
            }
        }

        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">Hklm {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!_instance.isInitialized)
                    </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                            </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

                </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_instance;
            }
        }

        #region IEnumerable&lt;RegistryKey&gt; Members

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:#9185fa;">IEnumerator</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; GetEnumerator() {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!isInitialized)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                        </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">allKeys.GetEnumerator();
        }

        </span><span style="background:black;color:#9185fa;">IEnumerator IEnumerable</span><span style="background:black;color:white;">.GetEnumerator() {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">GetEnumerator();
        }

        #endregion

        #region IEqualityComparer&lt;RegistryKey&gt; Members

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">If either contains a null, the result is false (actually it is
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">null be we do not have that option. It is 'unknown and indeterminant'.
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">An emptry string however is treated as 'known to be empty'
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">where null is 'could be anything we have no idea'.
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;x&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;y&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black;color:#ecc03e;">public bool </span><span style="background:black;color:white;">Equals(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">x, </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">y) {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">x.Name != </span><span style="background:black;color:#ecc03e;">null </span><span style="background:black;color:white;">&amp;&amp; y.Name != </span><span style="background:black;color:#ecc03e;">null </span><span style="background:black;color:white;">&amp;&amp; x.Name == y.Name;
        }

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">For null names here we will calculate a funky random number
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">as null != null
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;obj&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black;color:#ecc03e;">public int </span><span style="background:black;color:white;">GetHashCode(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">obj) {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">obj.Name != </span><span style="background:black;color:#ecc03e;">null
                           </span><span style="background:black;color:white;">? obj.Name.GetHashCode()
                           : </span><span style="background:black;color:#2b91af;">RuntimeHelpers</span><span style="background:black;color:white;">.GetHashCode(</span><span style="background:black;color:#ecc03e;">new object</span><span style="background:black;color:white;">());
        }

        #endregion

        #region IInitializable Members

        </span><span style="background:black;color:#ecc03e;">void </span><span style="background:black;color:#9185fa;">IInitializable</span><span style="background:black;color:white;">.Initialize() {
            Initialize();
        }

        #endregion

        </span><span style="background:black;color:#ecc03e;">public static event </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate </span><span style="background:black;color:white;">PopulateProgress {
            </span><span style="background:black;color:#ecc03e;">add </span><span style="background:black;color:white;">{ _instance.populateEventOk += </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
            </span><span style="background:black;color:#ecc03e;">remove </span><span style="background:black;color:white;">{ _instance.populateEventOk -= </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
        }

        </span><span style="background:black;color:#ecc03e;">private void </span><span style="background:black;color:white;">InvokePopulateProgress() {
            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">PopulateProgressDelegate = _instance.populateEventOk;
</span><span style="background:black;color:white;">                eventArgStatus.ItemCount = </span><span style="background:black;color:#2b91af;">Interlocked</span><span style="background:black;color:white;">.Increment(</span><span style="background:black;color:#ecc03e;">ref </span><span style="background:black;color:white;">iCounter);
                PopulateProgressDelegate(</span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">, eventArgStatus);

        }

        </span><span style="background:black;color:#ecc03e;">public static event </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError </span><span style="background:black;color:white;">PopulateProgressItemError {
            </span><span style="background:black;color:#ecc03e;">add </span><span style="background:black;color:white;">{ _instance.populateError += </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
            </span><span style="background:black;color:#ecc03e;">remove </span><span style="background:black;color:white;">{ _instance.populateError -= </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
        }

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">InvokePopulateProgressItemError(</span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args) {
         </span><span style="background:black;color:white;">  _instance.populateError(_instance, args);
        }

        </span><span style="background:black;color:#ecc03e;">public static void </span><span style="background:black;color:white;">Initialize() {
            Initialize(</span><span style="background:black;color:#2b91af;">Registry</span><span style="background:black;color:white;">.LocalMachine);
        }

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">Initialize(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">RegistryStartKey) {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(_instance.isInitialized)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                        </span><span style="background:black;color:#ecc03e;">&quot;Already Initialized. Cannot perform twice&quot;</span><span style="background:black;color:white;">);

          </span><span style="background:black;color:white;">
            _instance.allKeys = GetAllSubkeys(RegistryStartKey, </span><span style="background:black;color:#ecc03e;">&quot;&quot;</span><span style="background:black;color:white;">).ToHashSet(_instance);

            _instance.isInitialized = </span><span style="background:black;color:#ecc03e;">true</span><span style="background:black;color:white;">;
        }

        </span><span style="background:black;color:#ecc03e;">private static </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; GetAllSubkeys(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">StartkeyIn,
                                                              </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">NodeKey) {
            _instance.InvokePopulateProgress();

            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(StartkeyIn != </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {
                </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">SubItemRoot;

                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(TryOpenSubKey(StartkeyIn, NodeKey, </span><span style="background:black;color:#ecc03e;">out </span><span style="background:black;color:white;">SubItemRoot)) {
                    </span><span style="background:black;color:#ecc03e;">yield return </span><span style="background:black;color:white;">SubItemRoot;

                    </span><span style="background:black;color:#ecc03e;">foreach </span><span style="background:black;color:white;">(</span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">sub </span><span style="background:black;color:#ecc03e;">in

                            </span><span style="background:black;color:white;">SubItemRoot.GetSubKeyNames().SelectMany( </span><span style="background:black;color:#f5f01f;">// Recursion back into this method
                                    </span><span style="background:black;color:white;">s =&gt; GetAllSubkeys(SubItemRoot, s)))

                        </span><span style="background:black;color:#ecc03e;">yield return </span><span style="background:black;color:white;">sub;
                }
            }
        }

        </span><span style="background:black;color:#ecc03e;">private static bool </span><span style="background:black;color:white;">TryOpenSubKey(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">StartFrom, </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">Name,
                                          </span><span style="background:black;color:#ecc03e;">out </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">itemOut) {
            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">bIsOK = </span><span style="background:black;color:#ecc03e;">false</span><span style="background:black;color:white;">;
            itemOut = </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">;

            </span><span style="background:black;color:#ecc03e;">try </span><span style="background:black;color:white;">{
                itemOut = StartFrom.OpenSubKey(Name,
                        </span><span style="background:black;color:#b8a223;">RegistryKeyPermissionCheck</span><span style="background:black;color:white;">.ReadSubTree);
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(itemOut != </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                    bIsOK = </span><span style="background:black;color:#ecc03e;">true</span><span style="background:black;color:white;">;
            }
            </span><span style="background:black;color:#ecc03e;">catch </span><span style="background:black;color:white;">(</span><span style="background:black;color:#2b91af;">Exception </span><span style="background:black;color:white;">ex) {
                InvokePopulateProgressItemError(</span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs</span><span style="background:black;color:white;">(-1,
                        ex.Message + </span><span style="background:black;color:#2b91af;">Environment</span><span style="background:black;color:white;">.NewLine + </span><span style="background:black;color:#ecc03e;">&quot;Key=&quot; </span><span style="background:black;color:white;">+ StartFrom.Name + </span><span style="background:black;color:#ecc03e;">&quot; failed trying &quot; </span><span style="background:black;color:white;">+ Name));
            }

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">bIsOK;
        }
                                  }

    </span><span style="background:black;color:#ecc03e;">public delegate void </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError</span><span style="background:black;color:white;">(
            </span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args);

    </span><span style="background:black;color:#ecc03e;">public delegate void </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate</span><span style="background:black;color:white;">(
            </span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code">&#160;</pre>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">Simple EventArg for the two progress events
    </span><span style="background:black;color:gray;">///
    /// </span><span style="background:black;color:#9ff5fd;">NOTE: There will typically be some errors
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">which is fine as some parts of the Registry are
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">not accessible with standard security
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">: </span><span style="background:black;color:#2b91af;">EventArgs </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:#ecc03e;">private readonly string </span><span style="background:black;color:white;">_keyName;

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs(</span><span style="background:black;color:#ecc03e;">int </span><span style="background:black;color:white;">itemCount) : </span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">(itemCount, </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {}

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs(</span><span style="background:black;color:#ecc03e;">int </span><span style="background:black;color:white;">itemCount, </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">KeyName) {

            ItemCount = itemCount;
            _keyName = KeyName;

        }

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs() : </span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">(-1, </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {}

        </span><span style="background:black;color:#ecc03e;">public string </span><span style="background:black;color:white;">KeyName {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{ </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_keyName; }
        }

        </span><span style="background:black;color:#ecc03e;">public int </span><span style="background:black;color:white;">ItemCount { </span><span style="background:black;color:#ecc03e;">get</span><span style="background:black;color:white;">; </span><span style="background:black;color:#ecc03e;">internal set</span><span style="background:black;color:white;">; }
    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code">&#160;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Although not required, if you want to use this Registry Server (it makes a fantastic ‘mock’ server – although not really a Mock at all) put all the code above in a separate assembly for ease of use.</p>
<p>It’s great for trying our many variants of Linq queries over objects (as we do here) as the Registry – although a bit dangerous to muck about with – is a nice hierarchical source with enough interesting turns to make it fun. </p>
<p>In practice we rarely need to change the registry but if we did, it would be though this (we would carefully evolve it so it could perform controlled updates).</p>
<p>&#160;</p>
<h2>The Regression Tests</h2>
<p>&#160;</p>
<p>So we are using xUnit because we like it. Use whatever you want. The code shown next is the abstract base class our real test cases will use:</p>
<p>&#160;</p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">LinqToORMValidation {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry;

    </span><span style="background:black;color:#ecc03e;">public abstract class </span><span style="background:black;color:#2b91af;">BaseTestContext </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">RegistryServer_OnPopulateProgress(</span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args)
        {
            </span><span style="background:black;color:#f5f01f;">//Console.WriteLine(&quot;Processed &quot; + args.ItemCount + &quot; items&quot;);

        </span><span style="background:black;color:white;">}

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">RegistryServer_OnPopulateProgressError(</span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args)
        {
            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Error : &quot; </span><span style="background:black;color:white;">+ args.KeyName);
        }
        </span><span style="background:black;color:#ecc03e;">protected </span><span style="background:black;color:white;">BaseTestContext() {

            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.PopulateProgress += RegistryServer_OnPopulateProgress;
            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.PopulateProgressItemError += RegistryServer_OnPopulateProgressError;
            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Initialize();

            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Initialization Complete. Total Records = &quot; </span><span style="background:black;color:white;">+ </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Count);
        }

    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>NOTE: Un-Comment the Console.WriteLine in the OnPopulateProgress to view the status as it runs.</p>
<blockquote>
<p>The main area to see is the protected constructor. It’s clear that the Singleton is exposing a separate Initialize() method (we did this on purpose as it can take a little while for all those keys to get inside the HashSet&lt;T&gt; and debugging things if they go wrong in say a static constructor is harder then making a long-running initialization explicit. In general a good design decision we believe.</p>
</blockquote>
<p>&#160;</p>
<p>So the final part of code for this post at least is the first test which indeed shows the exact query from the beginning working:&quot;</p>
<pre class="code"><span style="background:black;color:white;"></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">LinqToORMValidation {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Diagnostics;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Linq;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Xunit;

    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">RegistryServerValidation </span><span style="background:black;color:white;">: </span><span style="background:black;color:#2b91af;">BaseTestContext </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">As a Linq IEnumerable</span><span style="background:black;color:gray;">&lt;T&gt; </span><span style="background:black;color:#9ff5fd;">result
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">if anything changed, the
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">underlying HashSet</span><span style="background:black;color:gray;">&lt;T&gt; </span><span style="background:black;color:#9ff5fd;">would not change. However if this
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">were a direct reference to the HashSet the values ARE
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">changeable. The idea is to project out immutable results
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">from the Registry server and indeed treat all the data
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">as read only
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        </span><span style="background:black;color:white;">[</span><span style="background:black;color:#2b91af;">Fact</span><span style="background:black;color:white;">]
        </span><span style="background:black;color:#ecc03e;">public void </span><span style="background:black;color:white;">should_prove_basic() {

            </span><span style="background:black;color:#f5f01f;">// Find the registry key(s) that have
            // VisualStudo in the name and end in
            // 'FontsAndColors' that also have at least
            // one value defined inside they key

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">sw =</span><span style="background:black;color:#2b91af;">Stopwatch</span><span style="background:black;color:white;">.StartNew();

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">FindFontsColors = </span><span style="background:black;color:#ecc03e;">from </span><span style="background:black;color:white;">rk </span><span style="background:black;color:#ecc03e;">in </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Hklm
                                  </span><span style="background:black;color:#ecc03e;">where
                                          </span><span style="background:black;color:white;">rk.Name.Contains(</span><span style="background:black;color:#ecc03e;">&quot;VisualStudio&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.Name.EndsWith(</span><span style="background:black;color:#ecc03e;">&quot;FontsAndColors&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.ValueCount &gt; 0

                                  </span><span style="background:black;color:#ecc03e;">select </span><span style="background:black;color:white;">rk.Name;

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">countMatched = FindFontsColors.Count();

            sw.Stop();

            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Total Records Matched = &quot; </span><span style="background:black;color:white;">+ countMatched);
            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Search Took : &quot; </span><span style="background:black;color:white;">+ sw.ElapsedMilliseconds + </span><span style="background:black;color:#ecc03e;">&quot; ms&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#f5f01f;">// Assert it took less then one second
            </span><span style="background:black;color:#2b91af;">Assert</span><span style="background:black;color:white;">.True(sw.ElapsedMilliseconds &lt; 1000);
            </span><span style="background:black;color:#2b91af;">ObjectDumper</span><span style="background:black;color:white;">.Write(FindFontsColors);
        }

    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>For this test cases we are very specifically finding any keys across any in HKLM matching the conditions: </p>
<ul>
<li>The key name ‘VisualStudio’ somewhere. </li>
<li>The key ends with &#8216;FontsAndColors’ </li>
<li>The key has at least one value inside (you’ll see why in the next post when things get harder) </li>
</ul>
<p>We also introduce a time to show off the speed of the HashSet&lt;T&gt;.</p>
<p>&#160;</p>
<p>Here I am making the assumption that the name of the key holds identity, and if null, we use standard null semantics (as defined in relational algebra).</p>
<p>The only few interesting points are the use of the static RuntimeHelpers class from .NET as the fact we are using the singleton static instance as the Equality instance.</p>
<p>&#160;</p>
<h2>Running the Code</h2>
<p>&#160;</p>
<p><a href="http://dcarr.files.wordpress.com/2008/09/image1.png"><img style="border-width:0;" title="image" border="0" alt="image" src="http://dcarr.files.wordpress.com/2008/09/image-thumb1.png?w=700&#038;h=526" width="700" height="526" /></a> </p>
<p>As expected we received a few errors, but they make sense as they are protected areas of the registry.</p>
<h3>So we matched across 233142 instances of RegistryKey with three conditions in 746ms. Try that in RegEdt32!!</h3>
<p>&#160;</p>
<div align="right">
<table border="1" cellspacing="4" cellpadding="4" width="400" align="right">
<tbody>
<tr>
<td valign="top" width="390">
<p align="center">MSDN Facts</p>
<p>The HashSet&lt;T&gt; class provides high performance set operations. A set is a collection that contains no duplicate elements, and whose elements are in no particular order. </p>
<p>The capacity of a HashSet&lt;T&gt; object is the number of elements that the object can hold. A HashSet&lt;T&gt; object&#8217;s capacity automatically increases as elements are added to the object. </p>
<p>The HashSet&lt;T&gt; class is a set collection that implements the <a href="http://msdn.microsoft.com/en-us/library/system.collections.icollection.aspx">ICollection</a> interface and the <a href="http://msdn.microsoft.com/en-us/library/92t2ye13.aspx">ICollection&lt;(Of &lt;(T&gt;)&gt;)</a> generic interface. </p>
<p><img src="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" /> Set Collections </p>
<p><a name="sectionToggle0"></a></p>
<p>In mathematics, a set is a collection of distinct objects that is usually defined by a rule that determines whether an element is a member of a particular set. For example, a set could be defined to contain &quot;all the odd numbers between 1 and 21&quot; or the numbers &quot;1, 3, 5 and 7&quot;. </p>
<p><img src="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" /> The HashSet Class </p>
<p><a name="sectionToggle1"></a></p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> class is based on the model of mathematical sets and provides high-performance set operations similar to accessing the keys of the <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx">Dictionary&lt;(Of &lt;(TKey, TValue&gt;)&gt;)</a> or <a href="http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx">Hashtable</a> collections. In simple terms, the <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> class can be thought of as a <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx">Dictionary&lt;TKey, TValue&gt;</a> collection without values. </p>
<p>A <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> collection is not sorted and cannot contain duplicate elements. If order or element duplication is more important than performance for your application, consider using the <a href="http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx">List&lt;(Of &lt;(T&gt;)&gt;)</a> class together with the <a href="http://msdn.microsoft.com/en-us/library/3da4abas.aspx">Sort</a> method. </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> provides many mathematical set operations, such as set addition (unions) and set subtraction. The following table lists the provided <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> operations and their mathematical equivalents. </p>
<p>HashSet(Of T) operation </p>
<p>Mathematical equivalent </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb342097.aspx">UnionWith</a></p>
<p>Union or set addition </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb293080.aspx">IntersectWith</a></p>
<p>Intersection </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb299875.aspx">ExceptWith</a></p>
<p>Set subtraction </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb336848.aspx">SymmetricExceptWith</a></p>
<p>Symmetric difference </p>
<p>In addition to the listed set operations, the <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(T&gt;</a> class also provides methods for determining set equality, overlap of sets, and whether a set is a subset or superset of another set. </p>
<p>&#160;</p>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>So far this has only set a baseline for the next exploration into these new methods provided in the HashSet&lt;T&gt; you might not have been aware of which we can now easily use: </p>
<p>&#160;</p>
<div id="contents">
<div style="height:607px;" id="ctl00_rs1_ra1" class="resizableArea">
<div id="ctl00_rs1_raRight" class="rightSection">
<div class="RightPanel">
<div class="ContentArea">
<div class="topic">
<div id="mainSection">
<div id="mainBody">
<div id="ctl00_rs1_mainContentContainer_cpe804725" class="MTPS_CollapsibleRegion">
<div style="width:auto;display:block;height:auto;overflow:visible;" id="ctl00_rs1_mainContentContainer_cpe804725_c" class="MTPS_CollapsibleSection">
<div style="border-bottom:medium none;border-left:medium none;display:block;border-top:medium none;border-right:medium none;" class="MTPS_CollapsibleSection">
<div class="tableSection">
<table width="50%">
<tbody>
<tr>
<th width="172">
<p>HashSet(Of T) operation </p>
</th>
<th width="176">
<p>LINQ equivalent </p>
</th>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl84" href="http://msdn.microsoft.com/en-us/library/bb342097.aspx">UnionWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl85" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.union.aspx">Union</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl86" href="http://msdn.microsoft.com/en-us/library/bb293080.aspx">IntersectWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl87" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.intersect.aspx">Intersect</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl88" href="http://msdn.microsoft.com/en-us/library/bb299875.aspx">ExceptWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl89" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.except.aspx">Except</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p>Not Provided </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl90" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.distinct.aspx">Distinct</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl91" href="http://msdn.microsoft.com/en-us/library/bb336848.aspx">SymmetricExceptWith</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl92" href="http://msdn.microsoft.com/en-us/library/bb355623.aspx">Overlaps</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl93" href="http://msdn.microsoft.com/en-us/library/bb358446.aspx">IsSubsetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl94" href="http://msdn.microsoft.com/en-us/library/bb351418.aspx">IsProperSubsetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl95" href="http://msdn.microsoft.com/en-us/library/bb346923.aspx">IsSupersetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl96" href="http://msdn.microsoft.com/en-us/library/bb299734.aspx">IsProperSupersetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl97" href="http://msdn.microsoft.com/en-us/library/bb346516.aspx">SetEquals</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
</tbody>
</table></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
<p>&#160;</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:57bcd4fd-45be-4e95-9e9b-7dba54a771c6" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Linq" rel="tag">Linq</a>,<a href="http://technorati.com/tags/HashSet" rel="tag">HashSet</a>,<a href="http://technorati.com/tags/ORM" rel="tag">ORM</a>,<a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a>,<a href="http://technorati.com/tags/Linq+to+NHibernate" rel="tag">Linq to NHibernate</a>,<a href="http://technorati.com/tags/Linq+Undocumented" rel="tag">Linq Undocumented</a>,<a href="http://technorati.com/tags/Functional+Programming" rel="tag">Functional Programming</a>,<a href="http://technorati.com/tags/.NET+3.5" rel="tag">.NET 3.5</a></div>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f09%2f08%2fthe_fastest_dot_net_hash_set_collection_with_linq_extended_features%2f&amp;title=Expose+New+Linq+Operations+from+the+Screaming+HashSet%3cT%3e+Collection"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/874/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/874/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/874/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=874&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/09/premature-6-thumb.jpg" medium="image">
			<media:title type="html">premature_optimization</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/09/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" medium="image" />

		<media:content url="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate 2.0 gold Released &#8211; Must Wait for &#8216;Linq to NHibernate&#8217;</title>
		<link>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/</link>
		<comments>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 18:00:54 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Industry News]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Advanced .NET]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>
		<category><![CDATA[Linq to NHibernate]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/</guid>
		<description><![CDATA[As expected, NHibernate 2.0 went gold yesterday and is available for download. This is official release 2.0.0 GA. Please ensure you review this list of breaking changes from the release notes. Linq to NHibernate is available for now only via the NHibernate Contrib project and is not included in this NHibernate release.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=762&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f"><img class="alignright" style="border:0 none;" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f" border="0" alt="kick it on DotNetKicks.com" width="82" height="18" /></a></p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank">NHibernate 2.0</a> went gold yesterday and is available for download from <a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank">here</a>.</p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank"></a></p>
<p>This is official release 2.0.0 GA. Please ensure you review this list of breaking changes from the release notes (also main items briefly listed below).</p>
<h2><strong>NOTE: Correction/clarification made 8/26 on Linq to NHibernate location.</strong></h2>
<p style="text-align:center;">The much anticipated <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" target="_blank">Linq</a> to NHibernate is available for now only via the NHibernate Contrib project and is not included in this NHibernate release.<br />
<em><br />
Although likely to change, there does not appear to be an installer for Linq to NHibernate so it must be accessed from the source code. To gain access to this, you will need a <a href="http://tortoisesvn.tigris.org/" target="_blank">subversion client such as Tortoise</a>, and then download the code.</em></p>
<blockquote>
<h3>To download ‘Linq to NHibernate&#8217; from <a href="http://sourceforge.net/svn/?group_id=216446" target="_blank">the Trunk go here</a></h3>
</blockquote>
<p>The location of the bits can be found under the repository at this location:</p>
<p><a title="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/" href="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/" target="_blank">http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/</a><br />
NOTE: Pictures Below Generated from <a href="http://www.ndepend.com/" target="_blank">NDepend</a>, a must-have tool for .NET Development</p>
<h1>gold release 2.0.0.GA</h1>
<h2>BREAKING CHANGES from NH1.2.1GA to NH2.0.0</h2>
<ul>
<li>
<h2>Infrastructure</h2>
<ul>
<li>.NET 1.1 is no longer supported</li>
<li>Nullables.NHibernate is no longer supported (use nullable types of .NET 2.0)</li>
<li>Contrib moved. New Location</li>
</ul>
</li>
</ul>
<div class="mceTemp mceIEcenter"><a title="NDepend Analysis" href="http://dcarr.files.wordpress.com/2008/08/componentdependenciesdiagram1.png" target="_blank"><img class="aligncenter" src="http://dcarr.files.wordpress.com/2008/08/techsmithwor48f.png?w=437&#038;h=625" alt="NDepend Analysis" width="437" height="625" /></a></div>
<div id="attachment_764" class="wp-caption aligncenter" style="width: 456px"><a href="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png"><img class="size-medium wp-image-764" style="border:2px solid black;" src="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png?w=446&#038;h=446" alt="" width="446" height="446" /></a><p class="wp-caption-text">NDepend Analysis</p></div>
<p><a href="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png"><img class="alignright" style="border:2px solid black;margin:10px;" src="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png?w=668&#038;h=368" alt="" width="668" height="368" align="left" /></a></p>
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="http://sourceforge.net/projects/nhcontrib">http://sourceforge.net/projects/nhcontrib</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2>Compile time</h2>
<ul>
<li>NHibernate.Expression namespace was renamed to NHibernate.Criterion</li>
<li>IInterceptor have additional methods. (IsUnsaved was renamed IsTransient)</li>
<li>INamingStrategy</li>
<li>IType</li>
<li>IEntityPersister</li>
<li>IVersionType</li>
<li>IBatcher</li>
<li>IUserCollectionType</li>
<li>IEnhancedUserType</li>
<li>IPropertyAccessor</li>
<li>ValueTypeType renamed to PrimitiveType</li>
</ul>
</li>
<li>
<h2>Possible Breaking Changes for external frameworks</h2>
</li>
</ul>
<ul>
<li>Various classes were moved between namespaces</li>
<li>Various classes have been renamed (to match Hibernate 3.2 names)</li>
<li>ISession interface have additional methods</li>
<li>ICacheProvider</li>
<li>ICriterion</li>
<li>CriteriaQueryTranslator</li>
</ul>
<li>
<h2>Initialization time</h2>
</li>
<ul>
<li>&lt;nhibernate&gt; section, in App.config, is no longer supported and will be ignored. Configuration schema for configuration file and App.config is now identical, and the App.config section name is: &lt;hibernate-configuration&gt;</li>
<li>&lt;hibernate-configuration&gt; have a different schema and all properties names are cheked</li>
<li>configuration properties are no longer prefixed by &#8220;hibernate.&#8221;, if before you would specify &#8220;hibernate.dialect&#8221;, now you specify just &#8220;dialect&#8221;</li>
<li>All named queries will be validated at initialization time, an exception will be thrown if any is not valid (can be disabled if needed)</li>
<li>Stricter checks for proxying classes (all public methods must be virtual)</li>
</ul>
<li>
<h2>Run time</h2>
<ul>
<li>SaveOrUpdateCopy() returns a new instance of the entity without changing the original</li>
<li>AutoFlush will not occur outside a transaction &#8211; Database transactions are never optional, all communication with the database must occur inside a transaction, whatever you read or write data.</li>
<li>NHibernate will return long for count(*) queries on SQL Server</li>
<li>&lt;formula&gt; must contain parenthesis when needed</li>
<li>These HQL function names may cause conflict in your HQL reserved names are:
<ul>
<li>substring</li>
<li>locate</li>
<li>trim</li>
<li>length</li>
<li>bit_length</li>
<li>coalesce</li>
<li>nullif</li>
<li>abs</li>
<li>mod</li>
<li>sqrt</li>
<li>upper</li>
<li>lower</li>
<li>cast</li>
<li>extract</li>
<li>concat</li>
<li>current_timestamp</li>
<li>sysdate</li>
<li>second</li>
<li>minute</li>
<li>hour</li>
<li>day</li>
<li>month</li>
<li>year</li>
<li>str</li>
</ul>
</li>
<li>&lt;any&gt; when meta-type=&#8221;class&#8221; the persistent type is a string containing the Class.FullName
<ul>
<li>In order to set a parameter in a query you must use SetParameter(&#8220;paraName&#8221;, typeof(YourClass).FullName, NHibernateUtil.ClassMetaType)</li>
</ul>
</li>
</ul>
</li>
<li>
<h2>Mapping</h2>
</li>
<ul>
<li>&lt;any&gt; : default meta-type is &#8220;string&#8221; (was &#8220;class&#8221;)</li>
</ul>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a1ce0c86-dec5-47df-ba81-a24c347edbb9" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/NHibernate">NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/Linq">Linq</a>,<a rel="tag" href="http://del.icio.us/popular/ORM">ORM</a>,<a rel="tag" href="http://del.icio.us/popular/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://del.icio.us/popular/.NET">.NET</a>,<a rel="tag" href="http://del.icio.us/popular/Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+Entities">Linq to Entities</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0941deb9-3263-47de-aa30-cc955dabfc9b" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/NHibernate">NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/Linq">Linq</a>,<a rel="tag" href="http://technorati.com/tags/ORM">ORM</a>,<a rel="tag" href="http://technorati.com/tags/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://technorati.com/tags/.NET">.NET</a>,<a rel="tag" href="http://technorati.com/tags/Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+Entities">Linq to Entities</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e70e71ec-da6c-4189-8c18-67b3923acdf5" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">LiveJournal Tags: <a rel="tag" href="http://www.livejournal.com/interests.bml?int=NHibernate">NHibernate</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq">Linq</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=ORM">ORM</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=.NET">.NET</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq+to+Entities">Linq to Entities</a></div>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f&amp;title=NHibernate+2.0+gold+Released+%e2%80%93+Must+Wait+for+%e2%80%98Linq+to+NHibernate%e2%80%99"><img style="border:0;" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<p><a href="http://www.stumbleupon.com/submit?url=http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/%26title%3DNHibernate%2BGold%2BReleased"><img class="alignleft" style="border:0;" src="http://www.stumbleit.com/images/120x20_su_white.gif" border="0" alt="" width="120" height="20" /> Stumble It!</a></p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank"><img class="alignleft" style="border:0;" src="http://dcarr.files.wordpress.com/2008/08/techsmithworcfb.png?w=483&#038;h=114" border="0" alt="nhibernate" width="483" height="114" align="right" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/762/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/762/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/762/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=762&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithwor48f.png" medium="image">
			<media:title type="html">NDepend Analysis</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png?w=400" medium="image" />

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>

		<media:content url="http://www.stumbleit.com/images/120x20_su_white.gif" medium="image" />

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithworcfb.png" medium="image">
			<media:title type="html">nhibernate</media:title>
		</media:content>
	</item>
		<item>
		<title>NHIbernate 2.0 Goes Beta 1 after Microsoft &#8216;Linq to Entities&#8217; receives &#8216;vote of no confidence&#8217;</title>
		<link>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/</link>
		<comments>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 04:48:00 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Expert ORM Opinion]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NHibernate Beta 1]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/</guid>
		<description><![CDATA[The first official beta for NHibernate 2.0 was released today.  After the recent initiative against  Microsoft ‘Linq to Entities’ in the form of a web-driven petition for a 'vote of no confidence’, the highly anticipated successor to the well-established NHibernate 1.2. We have been working with 2.0.X since the first alpha, and following the progress of the trunk. In our opinion this beta has the high quality of prior betas and we recommend it for non-critical systems immediately as your risk policy allows. We’re working on a more detailed analysis coming soon on some of the key improvements.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=376&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>NOTE: NHibernate 2.0 GOLD is released. This post is outdated. <a title="NHibernate 2.0 Released" href="http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/" target="_self">Click here for the info.</a></strong></p></blockquote>
<p><a href="http://sourceforge.net/project/platformdownload.php?group_id=73818"><img class="alignright" style="border-width:0;margin:5px;" src="http://dcarr.files.wordpress.com/2008/06/nhibernate.png?w=201&#038;h=52" border="0" alt="nhibernate" width="201" height="52" align="right" /></a></p>
<p><span style="font-size:medium;color:#ffffff;">The first official beta for NHibernate 2.0 was recently released<br />
</span></p>
<p><strong><a href="http://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969&amp;release_id=610227">Click here to download the package</a>.</strong></p>
<p>This comes on the heels of the damaging <a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/">‘boycott’</a> of the <a rel="tag" href="http://code.msdn.microsoft.com" target="_blank">Microsoft</a> ‘Linq to Entities’ upcoming release, which was anticipated to be a serious competitor to NHibernate.</p>
<p><a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/">Click here to view the on-line petition</a></p>
<p><a href="http://efvote.wufoo.com/reports/entity-framework-vote-of-no-confidence-signatories/#public">Click here to view the signers of the petition</a></p>
<p><a href="http://sourceforge.net/projects/nhcontrib"></a></p>
<table border="1" cellspacing="5" cellpadding="5" width="497">
<tbody>
<tr>
<td width="485" valign="top">
<h2>LAST MINUTE UPDATE FROM THE NHIBERNATE TEAM</h2>
<p>There has been a change in how NHibernate is packaged as the core and contrib aspects now have dedicated locations.</p>
<p>Since NHibernate 2.0 Alpha 1, <strong>ONLY THE CORE</strong> of the project is included at the link above. The <a href="http://sourceforge.net/projects/nhcontrib">Contrib Projects</a> are now in a dedicated location:</p>
<p><a href="http://sourceforge.net/projects/nhcontrib">http://sourceforge.net/projects/nhcontrib</a></p>
<p align="left">There are a few new projects that are essential to investigate for your needs (for example the <a href="http://nhcontrib.wiki.sourceforge.net/BurrowHome">Burrow project</a>). Also be sure to visit the wiki for these significant projects:</p>
<p><a href="http://nhcontrib.wiki.sourceforge.net">http://nhcontrib.wiki.sourceforge.net</a></p>
<p><strong>See the end of this post for a partial list of these contrib efforts.</strong></td>
</tr>
</tbody>
</table>
<p>The team at <a href="http://damon.agilefactor.com/">domain.dot.net</a> has been working with 2.0.X since the first alpha, and following the progress of the trunk. In our opinion this beta has the high quality of prior betas and we recommend it for non-critical systems immediately as your risk policy allows. We’re working on a more detailed analysis coming soon on some of the key improvements.</p>
<p>To download the code direct from the trunk use this SVN URL:</p>
<p><tt><a href="http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/">https://nhibernate.svn.sourceforge.net/svnroot/nhibernate</a></tt></p>
<p>This is no minor update, as with this release they will align with the widely used and praised <a href="http://www.hibernate.org/344.html">‘Hibernate 3.2’ for Java</a>. Here is a listing of the planned new features which are represented to varying degrees of complexness in this beta:</p>
<h2>NHibernate 2.0.0</h2>
<h3>The upcoming NHibernate 2.0 release will add support for many more exciting features; some are ported from Hibernate 3.x, others are features unique to NHibernate.</h3>
<p><a name="A15"></a></p>
<h4>Core</h4>
<ol>
<li>Updated Interceptor functionalities to match those in Hibernate 3.2</li>
<li>Support for SessionFactory events and listeners</li>
<li>CriteriaTransformer allows one to clone and transform ICriteria</li>
<li>Support for MultiCriteria; similar to MultiQuery implemented in NH1.2</li>
<li>Support for the &lt;join&gt; element. It enables table-per-subclass mapping using a discriminator, or mapping a single entity from more than one tables</li>
<li>StatelessSession provides an easier way to work with bulk operations</li>
<li>Support for CacheMode allows one to have better control on how the session interacts with the second-level cache</li>
<li>Implementation of query plan; NHibernate will parse named queries once at start-up time, thus improving performance</li>
<li>Support of native ID generator for &lt;idbag&gt;</li>
<li>Improved and more consistent syntax for configuration</li>
<li>Other internal improvements</li>
</ol>
<p><a name="A16"></a></p>
<h4>Sub-projects</h4>
<ul>
<li>NHibernate.Linq (a LINQ provider for NHibernate)</li>
<li>NHibernate.Statistics</li>
</ul>
<h2>NHibernate key features:</h2>
<ul>
<li><strong>Natural programming model</strong> &#8211; NHibernate supports natural OO idiom; inheritance, polymorphism, composition and the .NET collections framework, including generic collections.</li>
</ul>
<ul>
<li><strong>Native .NET</strong> &#8211; NHibernate API uses .NET conventions and idioms</li>
</ul>
<ul>
<li><strong>Support for fine-grained object models</strong> &#8211; a rich variety of mappings for collections and dependent objects</li>
</ul>
<ul>
<li><strong>No build-time bytecode enhancement</strong> &#8211; there&#8217;s no extra code generation or bytecode processing steps in your build procedure</li>
</ul>
<ul>
<li><strong>The query options</strong> &#8211; NHibernate addresses both sides of the problem; not only how to get objects into the database, but also how to get them out again</li>
</ul>
<ul>
<li><strong>Custom SQL</strong> &#8211; specify the exact SQL that NHibernate should use to persist your objects. Stored procedures are supported on Microsoft SQL Server.</li>
</ul>
<ul>
<li><strong>Support for &#8220;conversations&#8221;</strong> &#8211; NHibernate supports long-lived persistence contexts, detach/reattach of objects, and takes care of optimistic locking automatically</li>
</ul>
<ul>
<li><strong>Free/open source</strong> &#8211; NHibernate is licensed under the LGPL (Lesser GNU Public License)</li>
</ul>
<h2>Partial Listing of Key Contrib Work for NHibernate</h2>
<h3>NHibernate.Burrow</h3>
<blockquote><p>Burrow is a light weight middleware developed to support .Net applications using NHibernate (maybe also referred as NH in this article) as ORM framework.<br />
Using Asp.net with NHibernate could be a challenge because of the fact that NHibernate is a stateful environment while Asp.net is a stateless framework. Burrow can help solve this conflict by providing advanced and smart session/transaction management and other facilitates.</p></blockquote>
<p><strong>Road Map of Burrow Wiki:</strong></p>
<ul>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowIntroduction">Introduction</a> -</strong> a brief introduction of Burrow</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowGetStarted">Get Started</a></strong> &#8211; tells how to setup the Burrow framework.</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowConversationExplained">Burrow Conversation Explained</a> -</strong> gives more detail about long conversation.</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowStatefulFields">StatefulField Attributes</a> -</strong> about very useful Burrow.WebUtil attributes that can simplify states persistence for ASP.NET controls and pages</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowFAQ">FAQ</a></strong> &#8211; you know what it is.</li>
</ul>
<p>Other Projects:</p>
<ul>
<li><a href="http://nhcontrib.wiki.sourceforge.net/">Core Wiki – Click Here</a><br />
|</p>
<ul>
<li>NHibernate.Search</li>
<li>NHibernate.Mapping.Attributes</li>
<li>NHibernate.Validator</li>
<li>NHibernate.Shards</li>
<li><a class="wiki_link" href="http://nhcontrib.wiki.sourceforge.net/BurrowHome">NHibernate.Burrow</a></li>
<li>NHibernate.Caches.MemCache</li>
<li>NHibernate.Caches.Prevalence</li>
<li>NHibernate.Caches.SysCache</li>
<li>NHibernate.Caches.SysCache2</li>
<li>NHibernate.JetDriver</li>
<li>NHibernate.Tasks</li>
<li>NHibernate.Tool.hbm2net</li>
<li>NHibernate.UserTypes.Oracle</li>
<li>NHibernate.UserTypes.SqlTypes</li>
<li>&#8230; and others</li>
</ul>
</li>
<li>SBN Trunk is:
<ul>
<li><a title="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/" href="https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib">http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/</a></li>
</ul>
</li>
</ul>
<p align="right"><em>NHIbernate is a project under sponsorship of Red Hat Middleware, LLC.<br />
JBoss and Hibernate are registered trademarks<br />
</em><em>and servicemarks of Red Hat, Inc. All rights reserved. </em></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:df988018-7ec8-49d4-b07f-0a92ff05730d" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/NHibernate">NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/NHibernate+Beta+1">NHibernate Beta 1</a>,<a rel="tag" href="http://del.icio.us/popular/Castle">Castle</a>,<a rel="tag" href="http://del.icio.us/popular/ORM">ORM</a>,<a rel="tag" href="http://del.icio.us/popular/Microsoft">Microsoft</a>,<a rel="tag" href="http://del.icio.us/popular/Entity+Framework">Entity Framework</a>,<a rel="tag" href="http://del.icio.us/popular/Linq">Linq</a>,<a rel="tag" href="http://del.icio.us/popular/Expert+ORM+Opinion">Expert ORM Opinion</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d066c765-fc0d-4819-a527-281c315663b7" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/NHibernate">NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/NHibernate+Beta+1">NHibernate Beta 1</a>,<a rel="tag" href="http://technorati.com/tags/Castle">Castle</a>,<a rel="tag" href="http://technorati.com/tags/ORM">ORM</a>,<a rel="tag" href="http://technorati.com/tags/Microsoft">Microsoft</a>,<a rel="tag" href="http://technorati.com/tags/Entity+Framework">Entity Framework</a>,<a rel="tag" href="http://technorati.com/tags/Linq">Linq</a>,<a rel="tag" href="http://technorati.com/tags/Expert+ORM+Opinion">Expert ORM Opinion</a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/376/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/376/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=376&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/06/nhibernate.png" medium="image">
			<media:title type="html">nhibernate</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate Custom Collections Supporting Lazy Loading with IPersistentCollection &amp; DomainPersistentGenericBag</title>
		<link>http://team.pushbomb.com/2007/11/07/nhibernate-custom-collections/</link>
		<comments>http://team.pushbomb.com/2007/11/07/nhibernate-custom-collections/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 05:44:00 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Collections]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2007/07/23/nhibernate-custom-collections-supporting-lazy-loading-with-ipersistentcollection-domainpersistentgenericbag/</guid>
		<description><![CDATA[In NHibernate, to write a custom persistable collection you must inherit from PersistentGenericBag which has no empty constructors (therefore you cannot use this to inherit on your main collection (!) as you MUST have an empty constructor for NHibernate to use it). FUN!
When you inherit from the concrete List as well as IUserCollectionType and (after finally getting it to work perhaps) wonder why they get casting exceptions when using a lazy loaded collection (the default now with 1.2.0) it is more then a pain....<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=83&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><span style="color:#ff0000;"><strong>NOTE: This is now being updated to cover NHibernate 2.0.0.X so please check back if interested in new approaches to this. The previous solution posted is now outdated and I do not recommend using it.</strong></span></p>
<p style="text-align:center;"><strong></strong></p>
<p style="text-align:center;">I will soon be posting a new article which (in my opinion) could be far more useful to every<a href="http://dcarr.files.wordpress.com/2008/04/chart.png"><img class="alignright size-medium wp-image-165" style="float:right;border-width:0;margin:5px;" src="http://dcarr.files.wordpress.com/2008/04/chart.png?w=256" alt="" height="212" /></a>one then this article ever was as it:</p>
<ul>
<li>Has far greater scope and use as Is a &#8216;domain collection&#8217; engine and I believe the first solution to something I have been struggling with for years: The pain of building clean, quick web views in the world of Ajax, controls that expect datasets, and programmers not understanding ORM. It so far works with <a href="http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx">NHIbernate </a>(and <a href="http://using.castleproject.org/display/AR/An+introduction">ActiveRecord</a>) and I am finalizing Linq to Entity support</li>
<li>Leverages advanced .NET intrinsic&#8217;s (CustomTypeDescriptors, etc&#8230;) that are leveraged by the third-part component community</li>
<li>
<p style="text-align:left;">Support any &#8216;domain projection/entity set&#8217; operation &#8211; the same engine backs both bindable sets and non-bindable sets.. You just pass the HQL into the user control in VS 2005/2008</p>
</li>
</ul>
<p style="text-align:center;">
<p><span id="more-83"></span><strong></strong>Also stop by the new global repository I am bringing up with some others around &#8216;best practices&#8217; for domain driven (obsessed) work. This has a .NET 3.5 focus (as we will deeply discuss linq I am planning) however it is an architects site, so we will cover mono, java, and likely 50% of the content will be platform agnostic.More to come!</p>
<div style="text-align:center;"><span style="color:#666699;"></p>
<div style="text-align:center;"><strong></strong></div>
<p></span></div>
<p style="text-align:center;">
<div><span style="color:#666699;"></p>
<div style="text-align:center;"><strong><span style="color:#0000ff;">UPDATE: Billy McCafferty has done a fantastic job picking up where I barely get started.</span></strong></div>
<p><strong></strong></p>
<p></span></p>
<div><span style="color:#666699;"><strong><span style="color:#0000ff;"></p>
<div style="text-align:center;"><a href="http://devlicio.us/blogs/billy_mccafferty/archive/2007/12/03/custom-collections-with-nhibernate-part-i-the-basics.aspx">Go here for the must read posts.</a></div>
<div style="text-align:center;"> </div>
<div style="text-align:center;"> </div>
<p><font color="#666699"><strong><font color="#0000ff"> </p>
<p></font></strong></font></span> </p>
<p></strong></span><strong></strong></p>
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/83/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/83/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=83&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2007/11/07/nhibernate-custom-collections/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/04/chart.png?w=256" medium="image" />
	</item>
		<item>
		<title>Object/Relational Tools &#8211; NHibernate and Microsoft ADO.NET Entity Framework</title>
		<link>http://team.pushbomb.com/2006/09/09/objectrelational-tools-nhibernate-and-microsoft-adonet-entity-framework/</link>
		<comments>http://team.pushbomb.com/2006/09/09/objectrelational-tools-nhibernate-and-microsoft-adonet-entity-framework/#comments</comments>
		<pubDate>Sat, 09 Sep 2006 20:48:00 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[Domain.Driven.NET]]></category>
		<category><![CDATA[dsl]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2006/09/09/objectrelational-tools-nhibernate-and-microsoft-adonet-entity-framework/</guid>
		<description><![CDATA[Updated 6/26/2008
Microsoft had executed so well with Linq but to counter that, it&#8217;s now apparent EVEN WITHIN MICROSOFT that what will be shipped in the only &#8216;real ORM&#8217; sense they might offer will fundamentally be a non-starter (at least as the people who care about ORM are concerned).
Even Microsoft key staff agree. I was shocked [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=71&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Updated 6/26/2008</p>
<p><strong>Microsoft had executed so well with Linq but to counter that, it&#8217;s now apparent EVEN WITHIN MICROSOFT that what will be shipped in the only &#8216;real ORM&#8217; sense they might offer will fundamentally be a non-starter (at least as the people who care about ORM are concerned).</strong></p>
<p>Even Microsoft key staff agree. I was shocked to see this:</p>
<p><a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/">ADO .NET Entity Framework Vote of No Confidence</a></p>
<blockquote><p>The signatories of this letter are unanimous in expressing concern for the welfare of software projects undertaken in the Microsoft customer community that will make use of the forthcoming ADO .NET Entity Framework.<br />
Over the past year, Microsoft and the Entity Framework team have received a tremendous amount of feedback from experts in entity-based applications and software architectures on the .NET platform. While Microsoft’s announcement of its intention to provide framework support for entity architectures was received with enthusiasm, the Entity Framework itself has consistently proved to be cause for significant concern.</p></blockquote>
<p>And they are right on the money. There is no point is doing things well from a design perspective with ORM using the entity framework as is would counteract any benefit.</p>
<p>I hoped we could have a valid alternative as that could only benefit all of us, but we will not, at least for version 1.0</p>
<p>Long story short?</p>
<table style="height:43px;" border="1" cellspacing="0" cellpadding="2" width="414">
<tbody>
<tr>
<td width="667" valign="top">
<p align="center">We recommend the adoption of NHIbernate (you decide the version according to risk tolerance) with a strong recommendation to leverage the Linq provider. There is no other logical choice at this time we firmly believe. This will likely change however as Microsoft has shown they learn and adopt and (eventually) can get things right.</p>
</td>
</tr>
</tbody>
</table>
<p>To do quality &#8216;large scale enterprise&#8217; software of the type say the Java community for example has been delivering, the use of the Entity Framework would  harm your ability to adapt to change to the point of near uselessness.,</p>
<p>That being said here is my information set of links:</p>
<h3><a href="http://www.hibernate.org/343.html">NHibernate &#8211; Release Version 1.2.1 GA</a></h3>
<p><a href="http://www.castleproject.org/activerecord/index.html">with optional Castle ActiveRecord &#8211; RC3</a> (stable and OK for production use in my opinion &#8211; wrapper on NHibernate)</p>
<p><a href="http://sourceforge.net/projects/nhibernate/"><br />
</a></p>
<p><a href="http://sourceforge.net/projects/nhibernate/"> </a><a href="http://sourceforge.net/projects/nhibernate/">NHibernate &#8211; Pre Release 2.0.X</a></p>
<p><a href="http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/">SVN Trunk is</a>: https://nhibernate.svn.sourceforge.net/svnroot/nhibernate</p>
<p><a href="http://www.castleproject.org/activerecord/documentation/trunk/index.html">Castle ActiveRecord Trunk </a>(evolving with NHIbernate 2.0.X)</p>
<h3><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=15DB9989-1621-444D-9B18-D1A04A21B519&amp;displaylang=en">Microsoft Linq to Entities &#8211; Pre Release</a></h3>
<p>Make sure you understand what Linq is and is not. For example, here is one Microsoft clarification:</p>
<ol>
<table border="1" cellspacing="0" cellpadding="2" width="612">
<tbody>
<tr>
<td width="610" valign="top">
<li>
<div>Linq to SQL, released with the Visual Studio 2008, is designed to provide strongly-typed LINQ access for rapidly developed applications across the Microsoft SQL Server family of databases.</div>
</li>
<li>
<div>Linq to Entities, to be released in an update to Visual Studio 2008 in the first half of 2008, is designed to provide strongly-typed LINQ access for applications requiring a more flexible Object Relational mapping, across Microsoft SQL Server and third-party databases.Here I only discuss Linq to Entities</div>
</li>
</td>
</tr>
</tbody>
</table>
</ol>
<p>In 4/5 options NHIbernate is involved, however I LOVE LINQ and it would be fantastic if today we had a way to FULLY leverage it (we can use it to enumerate data as a full set of course). There is a very compelling effort to provide Linq to NHibernate which I have reviewed extensively, and this just provides more incentive to use a pre-release NHIbernate (not sure if it works on 1.2, will check however).</p>
<p>So the decision is further refined to:</p>
<h1>Decision Point: How will you leverage Linq?</h1>
<h2>Use Linq &#8216;persistence optimized&#8217; expressions</h2>
<p align="right">
<p>Linq to Entities &#8211; Pre Release using a Provider for your DB</p>
<p>NHIbernate Combined with <a href="http://www.ayende.com/Blog/archive/2007/03/17/Implementing-Linq-for-NHibernate-A-How-To-Guide--Part.aspx">Evolving Linq to NHIbernate Provider</a></p>
<li>Check <a href="http://ayende.com/Blog/archive/2007/03/16/Linq-for-NHibernate.aspx">this Linq (no pun intended) for this exciting work.</a></li>
<li>If you prefer not to build anything try: <a href="http://www.ayende.com/projects/scratch-pad.aspx">here</a></li>
<h2>Linq as Linq to Objects / Non-intelligent provider</h2>
<h1>Linq to Entities</h1>
<p>This is a big unknown for now. Sure Linq is fantastic but this is completely a new area for Microsoft and don&#8217;t make the common mistake of thinking Linq = ORM. THEY ARE TOTALLY DIFFERENT however Linq is a nice platform to build ORM on top of (as stated people have done).</p>
<li><a href="http://msdn.microsoft.com/en-us/data/aa937723.aspx">http://msdn.microsoft.com/en-us/data/aa937723.asp</a>You can download <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=15DB9989-1621-444D-9B18-D1A04A21B519&amp;displaylang=en">beta 3 here</a>Team Blog is here: <a href="http://blogs.msdn.com/adonet/archive/tags/Entity+Framework/default.aspx">http://blogs.msdn.com/adonet/archive/tags/Entity+Framework/default.aspx</a>Hibernate is the default choice and is proven in hundreds (if not thousands) of very large production systems in both Java and the .NET world.
<p>Microsoft holds the Linq card however as that is likely the future of .NET development in many ways..</p>
<h1>NHibernate</h1>
</li>
<li>The easy winner for now as not only is safety there by exposing the code, it is PROVEN. I am so amazed by the ill-advised companies that create &#8216;no open source&#8217; policies&#8230; DUH! The alternative is better for you?! You&#8217;d rather:1) Place an arbitrary constraint on your ability to innovate and operate effectively in software2) Execute in a manner that today is proven to be characterized as more expensive, of lower quality, with higher risk, etc. etc. simply because it is not a locked down proprietary offering??!!Learn more about NHIbernate? <a href="http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx">START HERE.</a>
<ul>
<li>DOWNLOAD:
<ul>
<li><a href="http://www.hibernate.org/343.html">http://www.hibernate.org/343.html</a></li>
</ul>
</li>
<li>Quick Starts:
<ul>
<li><a href="http://www.hibernate.org/362.html">http://www.hibernate.org/362.html</a></li>
</ul>
</li>
<li>Great Resources:
<ul>
<li><a href="http://www.hibernate.org/365.html">http://www.hibernate.org/365.html</a></li>
</ul>
</li>
</ul>
<p>For those getting started I HIGHLY recommend you start with ActiveRecord from the Castle project. For more information see: <a href="http://www.castleproject.org">http://www.castleproject.org</a> and <a href="http://www.domaindotnet.com">http://www.domaindotnet.com</a> . Also make sure you check out Castle ActiveWriter! It&#8217;s great to get started.</p>
<p>The domaindotnet site is specifically setup to discuss issues such as this, but in much greater detail and with code samples. However here are some samples that I have found critical in fine tuning the architecture for domain-development.</p>
<p>1) Don&#8217;t fall into the trap of coupling the &#8216;CRUD&#8217; work (or any modifications for that matter) with what you define as your &#8216;core entities&#8217;.</p>
<p>An example would be a &#8216;Customer&#8217; domain object. Use the &#8217;strategy&#8217; pattern to inject in a service which provides the &#8216;DAO&#8217; service if you will. Use ORM technology ON THE SERVICE not the entity. Use a container for injecting services like Windsor or Spring.NET.</li>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/71/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/71/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=71&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2006/09/09/objectrelational-tools-nhibernate-and-microsoft-adonet-entity-framework/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>
	</item>
	</channel>
</rss>