<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>NHibernate</title>
        <link>http://blogs.ugidotnet.org/DiegoL/category/NHibernate.aspx</link>
        <description>L'ORM per eccellenza</description>
        <language>it-IT</language>
        <copyright>Diego Lazzarino</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <item>
            <title>S#arp Architecture</title>
            <link>http://blogs.ugidotnet.org/DiegoL/archive/2009/04/16/sarp-architecture.aspx</link>
            <description>&lt;p&gt;&lt;img style="max-width: 800px;" src="http://devlicio.us/resized-image.ashx/__size/600x450/__key/CommunityServer.Components.UserFiles/00.00.00.21.06/sharp_5F00_arch_5F00_logo.gif" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pronounced "Sharp Architecture," this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Focused on Domain Driven Design &lt;/li&gt;&lt;li&gt;Loosely Coupled &lt;/li&gt;&lt;li&gt;Preconfigured Infrastructure &lt;/li&gt;&lt;li&gt;Open Ended Presentation &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The overall goal of this is to allow developers to worry less about application "plumbing" and to spend most of their time on adding value for the client by focusing on the business logic and developing a rich user experience. &lt;/p&gt;&lt;p&gt;Good background material reading includes &lt;a href="http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx" rel="nofollow"&gt;http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx&lt;/a&gt;. Although there are major infrastructural changes from this article in the current architecture, the general structure is very similar and the background reading is very helpful in understanding many of the ideas behind this architecture. S#arp Architecture documentation is included along side the current release. &lt;/p&gt;&lt;p&gt;S#arp Architecture and the preceding article have been referenced in NHibernate in Action by Pierre Henri Kuate, Windows Developer Power Tools by James Avery and Pro LINQ Object Relational Mapping in C# 2008 by Vijay P. Mehta. &lt;/p&gt;&lt;p&gt;Billy McCafferty &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Project &lt;a target="_blank" href="http://code.google.com/p/sharp-architecture/"&gt;homepage&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=329ac667-5079-874b-b239-69e5c341cee7" /&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/DiegoL/aggbug/95971.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Diego Lazzarino</dc:creator>
            <guid>http://blogs.ugidotnet.org/DiegoL/archive/2009/04/16/sarp-architecture.aspx</guid>
            <pubDate>Thu, 16 Apr 2009 10:54:59 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/DiegoL/archive/2009/04/16/sarp-architecture.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/DiegoL/comments/commentRss/95971.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Summer of NHibernate Screencast Series</title>
            <link>http://blogs.ugidotnet.org/DiegoL/archive/2008/10/03/94238.aspx</link>
            <description>&lt;br /&gt;Interessante serie di screencast su NHibernate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.summerofnhibernate.com/"&gt;http://www.summerofnhibernate.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Diego&lt;br /&gt;&lt;img src="http://blogs.ugidotnet.org/DiegoL/aggbug/94238.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Diego Lazzarino</dc:creator>
            <guid>http://blogs.ugidotnet.org/DiegoL/archive/2008/10/03/94238.aspx</guid>
            <pubDate>Fri, 03 Oct 2008 12:55:08 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/DiegoL/archive/2008/10/03/94238.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/DiegoL/comments/commentRss/94238.aspx</wfw:commentRss>
        </item>
        <item>
            <title>NHibernate ResultTransformer</title>
            <link>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/11/92172.aspx</link>
            <description>&lt;strong&gt;&lt;span style="font-size: 12pt; line-height: 115%; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Problema&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 12pt; line-height: 115%; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;br /&gt;
Trasformare un resultset generico in una lista tipizzata di DTO (quindi non una entity del Domain Model).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Soluzione&lt;/strong&gt;&lt;br /&gt;
Utilizzare ResultTransformer di NHibernate.  &lt;br /&gt;
Quest'interfaccia consente di specificare una classe di output sulla quale verrà "mappatio" il resultset.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;strong&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 115%; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Esempio&lt;/span&gt;&lt;/strong&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 115%; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;br style="" /&gt;
&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br style="" /&gt;
File di mapping&lt;br /&gt;
&lt;/span&gt;
&lt;div style="margin: 0pt auto; width: 95%;"&gt;
&lt;div style="border: 1px solid rgb(208, 208, 208); font-family: monospace; color: rgb(0, 0, 102); background-color: rgb(240, 240, 240);" class="xml"&gt;
&lt;ol&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;    &lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;lt;sql-query&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;name&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"GetCashFlowMainData"&lt;/span&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        &lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        &lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;lt;return-scalar&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;column&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"Id"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;type&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"Int32"&lt;/span&gt; &lt;span style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        &lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;lt;return-scalar&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;column&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"ReportType"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;type&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"Int32"&lt;/span&gt; &lt;span style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        &lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;lt;return-scalar&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;column&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"RepGroup1"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;type&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"Int32"&lt;/span&gt; &lt;span style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        &lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="font-weight: bold; color: black;"&gt;&amp;lt;return-scalar&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;column&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"RepGroup2"&lt;/span&gt; &lt;span style="color: rgb(0, 0, 102);"&gt;type&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"Int32"&lt;/span&gt; &lt;span style="font-weight: bold; color: black;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;        .......  &lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt; &lt;/div&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span lang="EN-US" style="font-size: 12pt; line-height: 115%; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt; &lt;br /&gt;
Snippet codice&lt;br /&gt;
&lt;/span&gt;
&lt;div style="margin: 0pt auto; width: 95%;"&gt;
&lt;div style="border: 1px solid rgb(208, 208, 208); font-family: monospace; color: rgb(0, 0, 102); background-color: rgb(240, 240, 240);" class="csharp"&gt;
&lt;ol&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;IQuery query = &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;IUnitOfWorkExtended&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;UnitOfWork&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 255);"&gt;GetNamedQuery&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"GetCashFlowMainData"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt; &lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;query.&lt;span style="color: rgb(0, 0, 255);"&gt;SetInt32&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"IdReport"&lt;/span&gt;, idReport&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;query.&lt;span style="color: rgb(0, 0, 255);"&gt;SetInt32&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"DayFrequency"&lt;/span&gt;, dayFrequency&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;query.&lt;span style="color: rgb(0, 0, 255);"&gt;SetDateTime&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"StartDate"&lt;/span&gt;, startDate&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;query.&lt;span style="color: rgb(0, 0, 255);"&gt;SetInt32&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;"PeriodNumber"&lt;/span&gt;, periodNumber&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt; &lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt;query.&lt;span style="color: rgb(0, 0, 255);"&gt;SetResultTransformer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;Transformers.&lt;span style="color: rgb(0, 0, 255);"&gt;AliasToBean&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?q=typeof+msdn.microsoft.com" style="color: rgb(0, 0, 96);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;typeof&lt;/span&gt;&lt;/a&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;CFRptCashFlowDTO&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;;&lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt; &lt;/div&gt;
    &lt;/li&gt;
    &lt;li style="font-family: 'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 130%; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 48, 48);"&gt;IList&amp;lt;ICFRptCashFlowDTO&amp;gt; result = quey.List&amp;lt;ICFRptCashFlowDTO&amp;gt;();
    &lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal; color: rgb(0, 0, 32);"&gt; &lt;/div&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Diego&lt;img src="http://blogs.ugidotnet.org/DiegoL/aggbug/92172.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Diego Lazzarino</dc:creator>
            <guid>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/11/92172.aspx</guid>
            <pubDate>Fri, 11 Apr 2008 10:47:36 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/11/92172.aspx#feedback</comments>
            <slash:comments>171</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/DiegoL/comments/commentRss/92172.aspx</wfw:commentRss>
        </item>
        <item>
            <title>NHibernate Mapping: verificare lo schema del database</title>
            <link>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/03/92043.aspx</link>
            <description>Snippet per verificare che lo schema del database corrisponda a quello descritto dal nostro Domain Model.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;
&lt;table cellspacing="0" cellpadding="0" style="border-width: 0px; border-bottom: 0px solid rgb(238, 238, 238); margin: 2px 0px; width: 99%; border-collapse: collapse; background-color: rgb(255, 255, 255);"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;font style="font-size: 11px;"&gt;[Test] &lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;&lt;font style="color: blue;"&gt;public&lt;/font&gt;&lt;font style="font-size: 11px;"&gt; &lt;/font&gt;&lt;font style="color: blue;"&gt;void&lt;/font&gt;&lt;font style="font-size: 11px;"&gt; AllNHibernateMappingAreOkay() &lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;{ &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;   ISessionManager sessionManager = IoC.Resolve&amp;lt;ISessionManager&amp;gt;(); &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;   &lt;font style="color: blue;"&gt;using&lt;/font&gt;&lt;font style="font-size: 11px;"&gt; (ISession session = sessionManager.OpenSession()) &lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;   { &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;       IDictionary allClassMetadata = session.SessionFactory.GetAllClassMetadata(); &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;       &lt;font style="color: blue;"&gt;foreach&lt;/font&gt;&lt;font style="font-size: 11px;"&gt; (DictionaryEntry entry &lt;/font&gt;&lt;font style="color: blue;"&gt;in&lt;/font&gt;&lt;font style="font-size: 11px;"&gt; allClassMetadata) &lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;       { &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;           session.CreateCriteria((Type) entry.Key) &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;                .SetMaxResults(0).List(); &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;       } &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color: rgb(247, 247, 247);"&gt;   } &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;}  &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
Fonte &lt;a href="http://www.ayende.com/Blog/archive/2006/08/09/7360.aspx" target="_blank"&gt;Ayende&lt;/a&gt;&lt;img src="http://blogs.ugidotnet.org/DiegoL/aggbug/92043.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Diego Lazzarino</dc:creator>
            <guid>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/03/92043.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 18:17:32 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/DiegoL/archive/2008/04/03/92043.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/DiegoL/comments/commentRss/92043.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>