<?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/"
	>

<channel>
	<title>[Dot] Code Dump &#187; asp.net</title>
	<atom:link href="http://www.dotcodedump.com/category/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotcodedump.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 06 Jan 2010 12:27:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.NET MVC&#8230; That was quick!</title>
		<link>http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/</link>
		<comments>http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 13:30:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=54</guid>
		<description><![CDATA[So I finally delved into ASP.NET MVC.  My first impression is it was very easy to get it up and running very quickly. When using the defualt application, I was very easily able to create new routes, and controllers.
The only thing that I did not like was the semantics of constructing a view.  [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/ModelViewControllerDiagram.svg/321px-ModelViewControllerDiagram.svg.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 321px; height: 151px;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/ModelViewControllerDiagram.svg/321px-ModelViewControllerDiagram.svg.png" alt="" border="0" /></a>So I finally delved into ASP.NET MVC.  My first impression is it was very easy to get it up and running very quickly. When using the defualt application, I was very easily able to create new routes, and controllers.</p>
<p>The only thing that I did not like was the semantics of constructing a view.  It felt so much like the spaghetti code that I tried not to use in ASP.NET.  I do see benefit, because one of the down falls with traditional ASP.NET that drove me crazy was trying to implement styling, against the traditional forms controls.  I can see very good things from not being tied to those controls, making it easier to implement rich controls such as items from <a href="http://developer.yahoo.com/yui/">YUI</a>.</p>
<p>My first impression is it&#8217;s all about the <a href="http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx">routes</a>.  Routes is the magic behind the curtains.  Routes control what controllers are run, and how the URL is processed.  MVC is a lot more than just URL handling, but coming from ASP.NET forms, good URL handling was one the major things ASP.NET was missing.</p>
<p>MVC is nothing new, but it is new to ASP.NET. I can&#8217;t wait to delve into it further.  I see many places where I previously used ASP.NET forms where MVC would have been a better fit.  I like MVC, but I could see it being over-used, and used improperly, where something like ASP.NET forms should have been used.  I also can&#8217;t wait for it to go to full release, then it will be a viable option.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=ASP.NET+MVC%26%238230%3B+That+was+quick%21&amp;url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/&amp;title=ASP.NET+MVC%26%238230%3B+That+was+quick%21" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+ASP.NET+MVC%26%238230%3B+That+was+quick%21+@+http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2009/03/asp-net-mvc-that-was-quick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google XML Sitemap library in ASP.NET</title>
		<link>http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/</link>
		<comments>http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 19:53:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[vb]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=21</guid>
		<description><![CDATA[XML site maps that are submitted to google or yahoo is fast becoming a standard.  Producing these in .NET can be straightforward.  Here is my example site map generator class.  The full generator must be passed a list of SitemapUrl objects, which is included in the project.
Download This Project
The project is in [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imgs.xkcd.com/store/imgs/online_communities_300.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://imgs.xkcd.com/store/imgs/online_communities_300.png" alt="" border="0" /></a>XML site maps that are submitted to google or yahoo is fast becoming a standard.  Producing these in .NET can be straightforward.  Here is my example site map generator class.  The full generator must be passed a list of SitemapUrl objects, which is included in the project.</p>
<p><a href="http://xmlsitemap.googlecode.com/files/XMLSitemapLibrary.Beta.zip">Download This Project</a></p>
<p>The project is in VB, and is independent of ASP.NET, so it could also be used for scripting, and is available via <a href="http://code.google.com/p/xmlsitemap/">google code</a>.</p>
<p><a id="Why?">The main goal for the library is to do one thing well: generate XML site maps. This is a very simple library designed to avoid using any unnecessary .NET libraries, such as any of the XML routines, aka lightweight. It is also made to be very hackable, and easy to implement. </a>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>Public Class XMLSitemap

 'This is a sitemap library of static functions to generate an xml sitemap for submission to google, yahoo, msn, etc 'Ian Lintner 'License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.html '7/15/2008

 Public Const XMLTag As String = "&lt;?xml version=""1.0"" encoding=""utf-8"" standalone=""yes""?&gt;" Public Const HeaderTag As String = "&lt;urlset xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9""&gt;" Public Const ClosingHeaderTag As String = "&lt;/urlset&gt;" Public Const GroupingTag As String = "url" Public Const LocationTag As String = "loc" Public Const FrequencyTag As String = "freq" Public Const ModifiedTag As String = "lastmod" Public Const PriorityTag As String = "priority"

 'Example of sitemap ' '&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt; '&lt;urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt; '   &lt;url&gt; '       &lt;loc&gt;http://www.mysite.com/home.html&lt;/loc&gt; '       &lt;lastmod&gt;2008-07-01&lt;/lastmod&gt; '       &lt;changefreq&gt;Weekly&lt;/changefreq&gt; '       &lt;priority&gt;1&lt;/priority&gt; '   &lt;/url&gt; '&lt;/urlset&gt;

 'This is accepts mistakes in the object, if it doesn't find what it needs it just doesn't include it Public Shared Function AddSitemapUrl(ByVal SitemapUrl As SitemapUrl) As String     Dim myStringBuilder As New StringBuilder()

     If SitemapUrl.Location IsNot Nothing AndAlso SitemapUrl.Location &lt;&gt; String.Empty Then         myStringBuilder.AppendLine(AddIndentedNode(LocationTag, SitemapUrl.Location, 2))

         If Not SitemapUrl.LastUpdated = DateTime.MinValue Then             'Date Format in sitemaps must be in 2008-01-01 format!             myStringBuilder.AppendLine(AddIndentedNode(ModifiedTag, Format(SitemapUrl.LastUpdated, "yyyy-MM-dd"), 2))         End If

         If SitemapUrl.UpdateFrequency IsNot Nothing AndAlso SitemapUrl.UpdateFrequency &lt;&gt; String.Empty Then             myStringBuilder.AppendLine(AddIndentedNode(FrequencyTag, SitemapUrl.UpdateFrequency, 2))         End If

         If SitemapUrl.Priority &gt; 0 AndAlso SitemapUrl.Priority &lt;= 1 Then             myStringBuilder.AppendLine(AddIndentedNode(PriorityTag, SitemapUrl.Priority.ToString, 2))         End If

         myStringBuilder.AppendLine(String.Empty)

         Return AddIndentedNode(GroupingTag, myStringBuilder.ToString, 1)     Else         Return ""     End If

 End Function

 Public Shared Function AddIndentedNode(ByVal Name As String, ByVal Value As String, ByVal Indent As Integer) As String     Dim myIndent As String = ""

     For i As Integer = 1 To Indent         myIndent &amp;= vbTab     Next

     Return AddNode(Name, Value, myIndent) End Function

 Public Shared Function AddNode(ByVal Name As String, ByVal Value As String, Optional ByVal Indent As String = "") As String     Dim myFormattedValue As String = Value.Replace("&amp;", "&amp;amp;")     Return Indent &amp; "&lt;" &amp; Name &amp; "&gt;" &amp; myFormattedValue &amp; "&lt;/" &amp; Name &amp; "&gt;" End Function

 Public Shared Function GenerateSitemap(ByVal SitemapUrlCollection As IEnumerable(Of SitemapUrl)) As String     Dim mySitemapEnumerator As IEnumerator(Of SitemapUrl)     Dim mySitemapStringBuilder As New StringBuilder()

     mySitemapStringBuilder.AppendLine(XMLTag)     mySitemapStringBuilder.AppendLine(HeaderTag)

     mySitemapEnumerator = SitemapUrlCollection.GetEnumerator()

     If mySitemapEnumerator IsNot Nothing Then         While mySitemapEnumerator.MoveNext             mySitemapStringBuilder.AppendLine(AddSitemapUrl(mySitemapEnumerator.Current))         End While     End If

     mySitemapStringBuilder.AppendLine(ClosingHeaderTag)

     Return mySitemapStringBuilder.ToString End Function

End Class</code></pre>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Google+XML+Sitemap+library+in+ASP.NET&amp;url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/&amp;title=Google+XML+Sitemap+library+in+ASP.NET" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Google+XML+Sitemap+library+in+ASP.NET+@+http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/google-xml-sitemap-library-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nhibernate + Recursion = Suck!</title>
		<link>http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/</link>
		<comments>http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/#comments</comments>
		<pubDate>Thu, 08 May 2008 20:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[recursion]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=4</guid>
		<description><![CDATA[I use nhibernate and I want to load a branch of the tree.  My tree is not binary, nor doubley linked.   Trust me this is bad really bad, you have a couple of options.

Load your whole graph or tree
Make lazy loaded calls one at a time to your tree, or some variation [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.hp-gramatke.de/pictures/perpet/escher03.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://www.hp-gramatke.de/pictures/perpet/escher03.jpg" alt="" border="0" /></a>I use nhibernate and I want to load a branch of the tree.  My tree is not binary, nor doubley linked.   Trust me this is bad really bad, you have a couple of options.</p>
<ol>
<li>Load your whole graph or tree</li>
<li>Make lazy loaded calls one at a time to your tree, or some variation there fore of.</li>
<li>Load your levels.</li>
</ol>
<p>If you chose option one you probably work for a hardware manfacturer, or don&#8217;t have an example, option 2 works if again you batch and have small tree.</p>
<p>Option 3 is the only real solution, and basically you will want to make sure your parent / parent id is loaded and not lazy loaded so you can trigger the next query.</p>
<p>Ex.</p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>

Dim myBranch as New List(Of Object)Dim myTree as New List(Of List(Of Object))

Dim myCurrentParentId as Object

'Loop StartmyCurrentParentId = myChildObj.ParentId

myBranch.Add(myChildObj.Id)myTree.Add(NhibernateQuery.List())'This query should be like "FROM Domain.Tree t WHERE t.ParentId = <img src='http://www.dotcodedump.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> arentId

'Loop End

</code></pre>
<p>You can then use the branch list to find selected children for displaying levels of tree, or a branch of a tree.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Nhibernate+%2B+Recursion+%3D+Suck%21&amp;url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/&amp;title=Nhibernate+%2B+Recursion+%3D+Suck%21" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Nhibernate+%2B+Recursion+%3D+Suck%21+@+http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/05/nhibernate-recursion-suck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
