<feed 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="http://www.w3.org/2005/Atom" xml:lang="en-US">
    <title>Mike Nichols - SonOfNun Technology</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/opiesblog/Atom.aspx" />
    <subtitle type="html">If I were the captain on a big steamboat...</subtitle>
    <id>http://geekswithblogs.net/opiesblog/Default.aspx</id>
    <author>
        <name>Mike Nichols</name>
        <uri>http://geekswithblogs.net/opiesblog/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2007-01-08T21:26:17Z</updated>
    <entry>
        <title>No Mo Here</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2007/01/08/103114.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2007/01/08/103114.aspx</id>
        <published>2007-01-08T21:26:00-06:00:00</published>
        <updated>2007-01-08T21:26:00Z</updated>
        <content type="html">No blogs are getting posted here...update feeds to &lt;b&gt;http://blogs.chayachronicles.com/sonofnun/Rss.aspx&lt;/b&gt; or swing by  the site at &lt;b&gt;http://blogs.chayachronicles.com/sonofnun/Default.aspx&lt;/b&gt;.
See you there :)
MIKE
&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/103114.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/103114.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/103114.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/103114.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Moving Day - Feeds, Update Thineselves (both of you)</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/10/04/93183.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/10/04/93183.aspx</id>
        <published>2006-10-04T11:13:00-05:00:00</published>
        <updated>2006-10-04T11:13:00Z</updated>
        <content type="html">&lt;h2&gt;We've moved&lt;/h2&gt;
&lt;p&gt;New blog found &lt;a href="http://blogs.chayachronicles.com/sonofnun/Default.aspx"&gt;here&lt;/a&gt; at http://blogs.chayachronicles.com/sonofnun/Default.aspx&lt;/p&gt;
&lt;p&gt;RSS is &lt;a href="http://blogs.chayachronicles.com/sonofnun/Rss.aspx"&gt;here&lt;/a&gt; at http://blogs.chayachronicles.com/sonofnun/Rss.aspx&lt;/p&gt;

Thanks to GWB for parking me here for a spell :)

MIKE&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/93183.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/93183.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/93183.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/93183.aspx</trackback:ping>
    </entry>
    <entry>
        <title>When Design Decisions Aren't</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/30/92819.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/30/92819.aspx</id>
        <published>2006-09-30T12:29:00-05:00:00</published>
        <updated>2006-09-30T12:29:00Z</updated>
        <content type="html">&lt;p&gt;I've been working exclusively alone on a project for a while and have as much liberty as any developer could hope for. I'm a blessed man. Nonetheless, I have tried to kind of "pretend" like I am working in a team environment that has regimented deadlines. This is mostly due to integrity and partly due to prevention for laziness...how easy is it to constantly be researching solutions without implementing them?&lt;/p&gt;
&lt;p&gt;There was a necessary period of growth in skill sets that had to occur and while I certainly haven't 'arrived' at some point the rubber has to hit the road and instead of striking out to google for an answer first, there must be some confidence on the toolkit that has been developed. A car has to at least be moving before turning the wheels even in the right direction will make any difference. &lt;/p&gt;
&lt;p&gt;So design decisions whether regarding overall architectural structure or about simple object creation aren't strictly design decisions, but are really business decisions. Maintainability is almost at the top of my list for development ; partly because it's just fun to meet the challenge, but also because I work alone and I could be buried with feature requests if I am not careful to write robust, scalable code. Still, this goal has a way of stalling design decisions if you're not careful. &lt;/p&gt;
&lt;p&gt;Realigning my thinking into Test Driven Development has largely stumped this phenomenon. Most importantly because TDD isn't about the tests, but meeting requirements in a iterative, thoughtful way. &lt;/p&gt;
&lt;p&gt;An example of this came up for deciding how I am going to query my DB using NHibernate as my OR/M. Now, I am using an IRepository&lt;T&gt; for controlling access to the NHibernate implementation of data access and this brings along a whole sweet suite (excuse me) of tools that are a snap to use. I need to create Query Objects to get the data I need in my domain, but do I really want to wrap so much that NHibernate already does for you? For example, do I need to wrap every ICriteria implementation with my own custom implementation to avoid the dependency on NHIbernate's API?How far does one take isolating a domain from specific implementation of these tools?&lt;/p&gt;
&lt;p&gt;There seem to be at least three options:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Have more specific IRepository&amp;lt;T&amp;gt; implementations that expose methods like "GetCustomerByNameAndGender(string name, Gender gender)", perhaps in CustomerRepository:IRepository&amp;lt;Customer&amp;gt;&lt;/li&gt;
&lt;li&gt;Create an Object Query language as I go that accepts calls maybe with fluid interface calls like .Where(PropertyName name) and so on&lt;/li&gt;
&lt;li&gt;Respect the Single Reponsibility Principle and use NHibernate's API within the Domain, but only within query objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first option really just moves the complexity into different area. Maintaining a million little methods really misses out on the joys of Object Oriented thinking where you can treat tasks as things and have adaptable code. The second option is tempting at first, but this is where the business man in me has to speak up and question the wisdom in this route. Do I really want to write a parallel Object Query language just for the sake of independence from an external tool's API? I think this is called "not created here" (or something like that) syndrome, right?&lt;/p&gt;
&lt;p&gt;So, after weighing my options, I very simply refactored my implementations of IQuery&amp;lt;T&amp;gt; to use the rich NHIbernate API and my Domain Entities use these objects that fill a collection of ICriteria objects, IProjection types and so on. MY IRepository&amp;lt;T&amp;gt; accepts any object of type IQuery&amp;lt;T&amp;gt; and returns the results I need. If I ever need to switch to a different OR/M provider I'll have to write implementations of IQuery&amp;lt;T&amp;gt; that speak that ORM's language. Really, if I am making that kind of change to an application, this level of adaption seems acceptable.&lt;/p&gt;
&lt;p&gt;One tool that can keep these changes from affecting my service layer is some kind of Dependency Injection container that gets the appropriate instance for me at runtime. So instead of instantiating IQuery&amp;lt;T&amp;gt; implementations directly from, say, a higher service layer, I can invoke Castle or Structure Map or whatever to get the instance that I configured. These kinds of tools are perfect for these situations. &lt;/p&gt;
&lt;i&gt;OK ...back to coding.&lt;/i&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92819.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92819.aspx</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92819.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92819.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Isolating NHibernate Logging</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/29/92721.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/29/92721.aspx</id>
        <published>2006-09-29T07:58:00-05:00:00</published>
        <updated>2006-09-29T08:01:00Z</updated>
        <content type="html">&lt;p&gt;I am sure everyone else has already figured this out but thought I'd jot it down here.&lt;/p&gt;
&lt;p&gt; I wanted to isolate all messages being sent from NHibernate to its own logging file. NHibernate has lots to say during its operations and often the messages it delivers are the only way of tracking down some obsure error since sometimes the exception messages in NHibernate are...well, wanting. After poking around the forums and trying out a few methods, here is how I finally split my NHibernate logs from the rest of my application logs. &lt;/p&gt;
&lt;h3&gt;The Configuration&lt;/h3&gt;
&lt;p&gt;For simplicity, say I want just two log text files produced, &lt;b&gt;system.log&lt;/b&gt; and &lt;b&gt;nhibernatelog.log&lt;/b&gt;. Look over the log4net configuration and Ignore the Console and AspNetTraceAppenders below:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cf2\cb8\highlight8   &amp;lt;\cf13 log4net\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 Console\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.ConsoleAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;!--\cf15  Pattern to output the caller's file name and line number \cf2 --&amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %5level [%thread] (%file:%line) - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 AspNetTraceAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.AspNetTraceAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date [%thread] %-5level %logger [%property\{NDC\}] - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.RollingFileAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 file\cf2  \cf6 value\cf2 =\cf0 "\cf2 ../../../log/nhibernatelog.log\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appendToFile\cf2  \cf6 value\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maximumFileSize\cf2  \cf6 value\cf2 =\cf0 "\cf2 1000KB\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maxSizeRollBackups\cf2  \cf6 value\cf2 =\cf0 "\cf2 2\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date %level %thread %logger - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 SystemAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.RollingFileAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 file\cf2  \cf6 value\cf2 =\cf0 "\cf2 ../../../log/system.log\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appendToFile\cf2  \cf6 value\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maximumFileSize\cf2  \cf6 value\cf2 =\cf0 "\cf2 1000KB\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maxSizeRollBackups\cf2  \cf6 value\cf2 =\cf0 "\cf2 2\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date %level %thread %logger - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    \par ??    &amp;lt;\cf13 root\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ALL\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 AspNetTraceAppender\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 Console\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 root\cf2 &amp;gt;\par ??\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernate\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ERROR\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernate.Loader.Loader\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 INFO\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 System\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ALL\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 SystemAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??\par ??  &amp;lt;/\cf13 log4net\cf2 &amp;gt;}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;log4net&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Console&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.ConsoleAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="color: gray; background: white; background-color:Transparent;"&gt; Pattern to output the caller's file name and line number &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%5level [%thread] (%file:%line) - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.RollingFileAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;file&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;../../../log/nhibernatelog.log&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appendToFile&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maximumFileSize&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;1000KB&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maxSizeRollBackups&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;2&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date %level %thread %logger - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;SystemAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.RollingFileAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;file&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;../../../log/system.log&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appendToFile&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maximumFileSize&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;1000KB&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maxSizeRollBackups&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;2&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date %level %thread %logger - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;root&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ALL&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Console&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;root&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ERROR&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernate.Loader.Loader&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;INFO&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;System&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ALL&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;SystemAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;log4net&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The primary points of interest are:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;I do not have my SystemAppender or my NHibernateAppender inside the &amp;lt;root /&amp;gt; element. Doing so resulted in duplicate entries&lt;/li&gt;
&lt;li&gt;The 'name' attribute on the &amp;lt;logger/&amp;gt; element is important. Take note.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Start 'er up&lt;/h3&gt;
&lt;p&gt;To get things wired up when the application starts, add this to your global.asax in the Application_Start section:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             log4net.Config.\cf10 XmlConfigurator\cf0 .Configure();\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; log4net.Config.&lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;XmlConfigurator&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;.Configure();&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h3&gt;Logging to 'system.log'&lt;/h3&gt;
&lt;p&gt;To get a reference to my 'system' logger, i just have to use the following:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8         \cf2 static\cf0  \cf10 ILog\cf0  logger = \cf10 LogManager\cf0 .GetLogger(\cf13 "System"\cf0 );\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;static&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;ILog&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; logger = &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;LogManager&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;.GetLogger(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"System"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Notice that I am referencing the logger by its name ("System") in the &amp;lt;logger/&amp;gt; section above. Then to write out to the file, just this:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             logger.Debug(\cf13 "Starting Unit Of Work For Request"\cf0 );\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; logger.Debug(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"Writing Debug Message"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h3&gt;Logging to 'nhibernate.log'&lt;/h3&gt;
&lt;p&gt;The important thing to understand about controlling logging for NHibernate is that it writes using the following call:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;LogManager.GetLogger( Type or string )&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://forum.hibernate.org/viewtopic.php?t=952087&amp;highlight=logger"&gt;this forum post&lt;/a&gt; for an explanation of the implications. I snagged the 'logger' setup from this post.&lt;/p&gt;
&lt;p&gt;What this means is that the &amp;lt;logger/&amp;gt; element in the configuration will need to have its 'name' set to 'NHibernate' since that is how it is called...any other name NHibernate just won't recognize and logging won't happen. &lt;/p&gt;
&lt;p&gt;Note, too , that the configuration above is only logging the SQL (NHibernate.Loader.Loader) sent to the DB and error messages. This helps sift out the rif-raf that I am not real interested in usually. &lt;/p&gt;

&lt;p&gt;Once these have been all set up I was successfully logging to the right file. Here are the posts that helped me:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.nhibernate.org/display/NH/Configuring+log4net+Logging"&gt;General log4net configuration with NHibernate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?t=952087&amp;highlight=logger"&gt;Seperating loggers and how NHibernate logs&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;

&lt;i&gt;I Hope this helps another NHibernator!&lt;/i&gt;





&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92721.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92721.aspx</wfw:comment>
        <slash:comments>6</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92721.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92721.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NHibernate Class Mapping With Generic Parameters</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/24/92220.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/24/92220.aspx</id>
        <published>2006-09-24T20:36:00-05:00:00</published>
        <updated>2006-09-24T20:36:00Z</updated>
        <content type="html">&lt;p&gt;I needed to implement a component that uses generic parameters. Documentation is sketchy on NHibernate so thot I'd jot it here. I *stole* an IRange&lt;T&gt; implementation from &lt;b&gt;someone&lt;/b&gt; and needed to use it for a date range within a class. &lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cf2\cb8\highlight8     &amp;lt;\cf13 component\cf2  \cf6 name\cf2 =\cf0 "\cf2 DateTimeRange\cf0 "\cf2  \cf6 class\cf2 =\cf0 "\cf2 Cei.eMerge.Common.Range`1[System.DateTime], Cei.eMerge.Common\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase-underscore\cf0 "\cf2  &amp;gt;\par ??      &amp;lt;\cf13 property\cf2  \cf6 name\cf2 =\cf0 "\cf2 Start\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 column\cf2  \cf6 name\cf2 =\cf0 "\cf2 StartDate\cf0 "\cf2  \cf6 not-null\cf2 =\cf0 "\cf2 true\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;/\cf13 property\cf2 &amp;gt;\par ??      &amp;lt;\cf13 property\cf2  \cf6 name\cf2 =\cf0 "\cf2 End\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 column\cf2  \cf6 name\cf2 =\cf0 "\cf2 EndDate\cf0 "\cf2  \cf6 not-null\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 property\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 component\cf2 &amp;gt;\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;component&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;DateTimeRange&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;class&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Cei.eMerge.Common.Range`1[System.DateTime], Cei.eMerge.Common&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase-underscore&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Start&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;column&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;StartDate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;not-null&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;End&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;column&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;EndDate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;not-null&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;component&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Note the &lt;b&gt;`[genericTypeParameter]&lt;/b&gt; syntax. Here's how we map it. Be sure you have a default constructor! The exceptions thrown by NOT having a default constructor are riddles at best. &lt;/p&gt;
&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92220.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92220.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92220.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92220.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NHibernate Parameters and Escaping Special Characters in HQL</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/19/91635.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/19/91635.aspx</id>
        <published>2006-09-19T11:48:00-05:00:00</published>
        <updated>2006-09-19T11:50:00Z</updated>
        <content type="html">&lt;p&gt;I am sure I everyone else knows this by now, but I wanted to jot a note. When you are passing strings to an HQL query, it's best practice to assign those strings to a parameter (named or positional) and let HQL escape the special characters for you. So it would look like this when searching by a Name and Distinction tag on an Entity:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             \cf10 StringBuilder\cf0  queryString = \cf2 new\cf0  \cf10 StringBuilder\cf0 ();\par ??            \par ??            queryString.Append(\cf13 "from Entity e where e.Name= :name AND "\cf0 );\par ??            queryString.Append(\cf13 "e.DistinctionTag = :distinctionTag "\cf0 );\par ??\par ??            \cf2 try\par ??\cf0             \{\par ??                query.Match = Session.CreateQuery(queryString.ToString()).SetString(\cf13 "name"\cf0 ,query.Name)\par ??                                  .SetString(\cf13 "distinctionTag"\cf0 ,query.DistinctionTag).UniqueResult() \cf2 as\cf0  \cf10 IEntity\cf0 ;\par ??            \}\par ??            \cf2 catch\cf0  (\cf10 NonUniqueResultException\cf0 )\par ??            \{\par ??                query.Match = \cf2 new\cf0  \cf10 NullEntity\cf0 ();\par ??            \}\par ??            \cf2 return\cf0  query.Match;\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;StringBuilder&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; queryString = &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;new&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;StringBuilder&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryString.Append(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"from Entity e where e.Name= :name AND "&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryString.Append(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"e.DistinctionTag = :distinctionTag "&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; query.Match = Session.CreateQuery(queryString.ToString()).SetString(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"name"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;,query.Name)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; .SetString(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"distinctionTag"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;,query.DistinctionTag).UniqueResult() &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;as&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;IEntity&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;catch&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; (&lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;NonUniqueResultException&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; query.Match = &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;new&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;NullEntity&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;return&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; query.Match;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;p&gt;The call to .SetString() is where we assign our parameters to our string values. This works for matching Custom Classes and even Custom Type Properties as well. Sweet.&lt;/p&gt;
&lt;h5&gt;Further Info&lt;/h5&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;Hibernate in Action&lt;/i&gt; pp. 245-247&lt;/li&gt;&lt;/ulul&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91635.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91635.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91635.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91635.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Patterns, voicings, and rudiments</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/14/91224.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/14/91224.aspx</id>
        <published>2006-09-14T16:40:00-05:00:00</published>
        <updated>2006-09-14T16:40:00Z</updated>
        <content type="html">&lt;p&gt;For the first 14 years of my professional life, I was a touring musician with a Master's in Music Performance in percussion. By the grace of God, I've been moved along into a fun profession of Software Development. For the most, I've been a lone ranger and have had to learn everything on my own, which is fine since I enjoy problem solving. As I've matured (ok..I am still in Beta :)) in my 'skills' - not the numbchuck kind - I've seen many parallels to music composition/arrangement and development. This isn't a new idea I know, but one struck me tonight.&lt;/p&gt;
&lt;p&gt; I needed to add a new field to distinguish records on an object. Now, in the past I'd add the field int the Db and then have to think about ALL THE PLACES I HAVE TO ADD IT and any functionality to accomodate it. This simple requirement COULD break my whole dang domain if I had built spaghetti code. However, as I've built my domain, certain styles and patterns have emerged that let me ALMOST be mindless in solving problems like these. Since I had implemented solutions using certain software patterns, I could simply look into the domain and let IT tell me how to code. Kind of a pattern-of-patterns thing. &lt;/p&gt;
&lt;p&gt; A parallel to this in jazz piano is voicings on a keyboard. Pianists like Bill Evans, McCoy Tyner (tho I shudder to put them in the same sentence), Red Garland and so on voiced chords in their unique way, but did so usually from a common way of thinking about how a chord SHOULD be voiced. Voicings, by the way, are the notes you select to play a type of chord...so McCoy might leave the third  out to get a kind of earthy sound, but Evans might add upper partials to a chord to give more of a shimmer. The point is, IT'S THE SAME CHORD but they have a bag of tricks to drawn on so they don't have to freak out everytime a new chord comes along. &lt;/p&gt;
&lt;p&gt;Patterns in software are like that I think and actually make the process of development more fun. Not because you can use fancy terms .. they are just ways to solve problems. But in the end, I feel like I have expressed something in a way I WANTED to express it, as opposed to throwing datasets all over the place and then feeling lucky that I just got the data back and forth to the user. &lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91224.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91224.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91224.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91224.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Builds that make my eyes bleed and the assemblies that cause them</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/13/91092.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/13/91092.aspx</id>
        <published>2006-09-13T09:16:00-05:00:00</published>
        <updated>2006-09-13T09:16:00Z</updated>
        <content type="html">&lt;p&gt;Lately, my ASP.NET 2.0 app has been taking so long to build I have been going crazy. I came across this post at &lt;a href="http://weblogs.asp.net/scottgu/archive/2006/07/30/Common-Gotcha_3A00_-Slow-VS-2005-Web-Site-Build-Performance-Because-of-_1C20_Dueling-Assembly-References_1D20_.aspx"&gt;ScottGu's&lt;/a&gt; blog that had a possible cause for suddenly long build times. I have about 20 projects, but it's hardly a massive site. &lt;/p&gt;
&lt;p&gt;I had some problems that I just kind of put up with a while ago where an older version of Iesi.Collections.dll would appear in my /bin folder of my web root and I have been running the NHibernate alpha 9that uses version 1.0.0.2 of Iesi.Collections). Anyways, it didn't occur to me that this was cuasing the problems ScottGu is discussing in his blog. But I couldn't track down WHO was bringing in the wrong assembly. Finally, I remembered that some code was using Ayende's NHibernate.Generics ... AHA! This was built against the older Iesi collections assembly so that was the culprit.&lt;/p&gt;
&lt;p&gt;So since I am moving to the new NHibernate that supports generics anyways, I yanked all the references and code out that use the NHibernate.Generics library and my build times got back to normal and my sanity has slowly begun to be restored...&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91092.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91092.aspx</wfw:comment>
        <slash:comments>9</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91092.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91092.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Validation With Bows and Arrows or With Battle Axes and Swords?</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/12/90992.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/12/90992.aspx</id>
        <published>2006-09-12T09:42:00-05:00:00</published>
        <updated>2006-09-12T09:42:00Z</updated>
        <content type="html">&lt;p&gt;One of the things that requires a realignment in thinking when moving away from RAD development tools as a means of solving business problems into a Domain Driven approach is where to put validation
and how to provide meaningful messages back to the user when something goes wrong. &lt;/p&gt;
&lt;p&gt;It seems to me that a good indicator of an anemic strategy for validating data is lots of work being done with validation controls and checks at the presentation (view) level. That doesn't
mean that careful validation and thoughtful strategies at this layer are useless, but rather we shouldn't DEPEND on this layer to guard our datastore from bad data. Personally, I love
using &lt;a href="http://www.peterblum.com/Home.aspx"&gt;Peter Blum's Validation Controls&lt;/a&gt; for my web pages because he has taken great pains to create a rich set of controls that do one thing VERY
well...validate at the client-side. Still, before I implemented a rich validation scheme across my layers in my app, I was spending TOO MUCH time with these controls to do work that 
belonged in the Domain Layer. &lt;/p&gt;
&lt;p&gt;A neat approach to validating entities in the Domain layer can be found on &lt;a href="http://www.jpboodhoo.com/blog/ValidationInTheDomainLayerTakeTwo.aspx"&gt;JP Boodhoos site&lt;/a&gt; where he has a 
thorough explanation of a kind of reactive validation scheme. It's simple and easy to implement as well as flixible, should you want to apply different rules on the same entities. &lt;/p&gt;
&lt;p&gt;After being careful in validating data and implementing strategies in the 'lower layers' I discovered that I had to do very little to guard my user's input from garbage data. All of a sudden, I didn't have
to have a ton of validation controls checking conditional comparisons or making sure data was complete before posting &lt;i&gt;because the thoughtfulness that was applied to the domain layer bubbled up
to how I designed my User Interface strategy&lt;/i&gt;. &lt;/p&gt;
&lt;p&gt;So for me, when I find myself having to accomodate complex rules in the User Interface, I need to take a step back and see if there is some insight in the Domain Layer that i haven't 
gotten yet...for example, 
&lt;ul&gt;&lt;li&gt;Is there &lt;a href="http://xp.c2.com/YouArentGonnaNeedIt.html"&gt;YAGNI&lt;/a&gt; lurking in my design that might simplify things vertically across the layers?&lt;/li&gt;
&lt;li&gt; Did I let my own business specs creep in, or are my requirements actually coming from the stakeholders?&lt;/li&gt;
&lt;li&gt; Am I building my User Interface TOO SOON? Maybe I need to understand my domain better if I am adding and deleting controls like crazy.&lt;/li&gt;
&lt;li&gt; Am I relying on textboxes with elaborate javascript do things that CODE should do in the layer beneath? &lt;/li&gt;
&lt;p&gt;These are good questions to ask when i am sticking a million validation controls on my page.&lt;/p&gt;
&lt;p&gt;I kind of think of clientside validation like the guys with the bows and arrows on top of the wall around the city when the Orcs are marching in with their bad typing skills. They can take out
quite a few of the bad guys, but really the heart of the protection is going to take place by the fellas in the Domain layer with their swords and magic wands. The women in my database are relying
more on the guy with the battle axe than the guy with the slingshot. &lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90992.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90992.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90992.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90992.aspx</trackback:ping>
    </entry>
    <entry>
        <title>I'm sure I don't get it about the ObjectDataSource control</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/11/90906.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/11/90906.aspx</id>
        <published>2006-09-11T13:32:00-05:00:00</published>
        <updated>2006-09-11T13:32:00Z</updated>
        <content type="html">&lt;p&gt;I guess I'm confused about the ObjectDataSource control. the SqlDataSource control is a non-issue for me since I'll *never* build an app that puts a view dependency on my database schema, but I see alot about the ObjectDataSource control in the Nhibernate forum. &lt;/p&gt;
&lt;p&gt;It's been a while since I actually wrangled with the ObjectDataSource control since I didn't see what advantage trying to get it to wireup to my model this extra control would bring to the table. What is so different about simply binding to a Repeater control? Two-way binding I suppose is the answer, but typically I communicate with a service layer on top of my domain entities since I rather protect my domain entities from upper layers, so by the time i get done wiring up the CRUD events in these new ASP.NET 2.0 controls, did I save time from simply iterating over a repeater and passing the values to the appropriate service for processing?&lt;/p&gt;
&lt;p&gt;I'd love to see know what I'm missing since so many developers seem to be spending time extending these controls that, at least from what i can tell, expose an app's Domain layer to bad practices and creates rigid dependencies between the view and it's data source.&lt;/p&gt;
&lt;p&gt;What you tink sensei?&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90906.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90906.aspx</wfw:comment>
        <slash:comments>8</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90906.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90906.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Visitor Pattern For DataBinding ListControls with Model View Presenter </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/09/90769.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/09/90769.aspx</id>
        <published>2006-09-09T22:30:00-05:00:00</published>
        <updated>2006-09-09T22:36:00Z</updated>
        <content type="html">&lt;p&gt;Implementing the Model-View-Presenter has been fun. I appreciate it's tendency to enforce discipline in keeping any business decisions out of the View layer. I was always bewildered when I would read that
the business logic should be separated from the 'code-behind' source and then see millions of DataSet examples where that was tons of business logic embedded in Web Pages.&lt;/p&gt;
&lt;p&gt;However, trying to separate the presentation logic away and keep the client as dumb as possible presents (forgive the pun) some new challenges. Keeping the presenter interacting with only 
the interfaces of both the IView and IFacade (or IService or whatever...IModel) is straightforward so long as basic property setters and getters on the view are the requirements. But when you get
into nested collections within collections AND want to keep the client dumb, then it is time to reach into the patterns hat for a solution.&lt;/p&gt;
&lt;p&gt;Specifically, I wasn't sure how to have the Presenter authoritative for logic decisions while still keeping the DataBind() calls in place on my DataSource controls (like a Repeater). My first reaction is 
to create a kind of 'placeholder' property for the DataItem and have that iteratively set during binding for processing in the Presenter layer. For example, perhaps a different list in a dropdown
list needs to appear BASED ON WHAT THE DATA ITEM IS. I want my presenter to inject the correct list, but how to do that during binding? &lt;/p&gt;
&lt;p&gt;A refactoring has emerged that I'll call &lt;b&gt;Replace Placeholder Property With Visitor&lt;/b&gt;. The &lt;a href="http://www.dofactory.com/Patterns/PatternVisitor.aspx"&gt;Visitor&lt;/a&gt; pattern is well-suited
to exactly this kind of databinding dilemma. No doubt, some will think it's heavyhanded, but I have found it elegant and keeps responsibilities between the view and presenter where they belong.&lt;/p&gt;
&lt;p&gt;To start, say we have Person we want to edit that has a collection of Addresses. We want to bind a Repeater control on a collection of Labels so that for each label, we have a blank Address
form. Within each address form, we have a drop down list of StreetTypes (Rd, St, Ln, etc). So it looks like &lt;a href="http://geekswithblogs.net/opiesblog/gallery/image/3096.aspx"&gt;this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To use the Visitor pattern to inject the list of StreetTypes into the DropDown list, we'll abstract away the contracts and have the actors only deal with those. First, the ISaveAddressViewItem interface
This will live in the Presentation project so the Presenter will interact with any implementation of it. Before creating that let's have it inherit from a more generic interface (explain later):&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 interface\cf0  \cf10 IViewRepeaterItem\par ??\cf0     \{\par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;interface&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Ok, now let's create the contract that has the property names we expect.&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 interface\cf0  \cf10 ISaveAddressViewItem\cf0 :\cf10 IViewRepeaterItem\par ??\cf0     \{\par ??        \cf2 string\cf0  Label \{ \cf2 get\cf0 ;\}\par ??        \cf2 string\cf0  SuiteApartment \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  PostalCode \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField1Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField1StreetType \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField2Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField3Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??\par ??        \cf10 IList\cf0 &amp;lt;\cf10 StreetTypes\cf0 &amp;gt; StreetTypes \{ \cf2 set\cf0 ;\}\par ??\par ??\par ??    \}\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;interface&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;:&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; Label { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; SuiteApartment { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; PostalCode { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1StreetType { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField2Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField3Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt; StreetTypes { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Next, let's create a custom RepeaterItem that will implement this interface. We'll put this in its own project where we create our other custom controls (NOT App_Code!):&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 class\cf0  \cf10 SaveAddressViewRepeaterItem\cf0  : \cf10 RepeaterItem\cf0 , \cf10 ISaveAddressViewItem\cf0 ,\cf10 IViewRepeaterItem\par ??\cf0     \{\par ??        \cf2 public\cf0  SaveAddressViewRepeaterItem(\cf2 int\cf0  itemIndex, \cf10 ListItemType\cf0  itemType) : \cf2 base\cf0 (itemIndex, itemType)\par ??        \{\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  Label\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;System.Web.UI.WebControls.\cf10 Label\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "Label"\cf0 ).Text; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  SuiteApartment\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "SuiteApartment"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "SuiteApartment"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  PostalCode\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "PostalCode"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "PostalCode"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField1Value\par ??        \{\par ??            \cf2 get\cf0  \{\cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 ,\cf13 "StreetField1Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{\cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 ,\cf13 "StreetField1Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField1StreetType\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 ).SelectedValue; \}\par ??            \cf2 set\cf0  \{\par ??                \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 ).SelectedValue = \cf2 value\cf0 ;\}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField2Value\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField2Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField2Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField3Value\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField3Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField3Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf10 IList\cf0 &amp;lt;\cf10 StreetTypes\cf0 &amp;gt; StreetTypes\par ??        \{\par ??            \cf2 set\par ??\cf0             \{\par ??                \cf10 DropDownList\cf0  list = \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 );\par ??                \cf2 if\cf0  (list != \cf2 null\cf0 )\par ??                    list.DataSource = \cf2 value\cf0 ;\par ??            \}\par ??        \}\par ??        \par ??        \par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;class&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;SaveAddressViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; : &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; SaveAddressViewRepeaterItem(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;int&lt;/span&gt;&lt;span style="background: white;"&gt; itemIndex, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt; itemType) : &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;base&lt;/span&gt;&lt;span style="background: white;"&gt;(itemIndex, itemType)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; Label&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;System.Web.UI.WebControls.&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Label&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"Label"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; SuiteApartment&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"SuiteApartment"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"SuiteApartment"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; PostalCode&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"PostalCode"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"PostalCode"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1Value&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1StreetType&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1StreetTypes"&lt;/span&gt;&lt;span style="background: white;"&gt;).SelectedValue; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1StreetTypes"&lt;/span&gt;&lt;span style="background: white;"&gt;).SelectedValue = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField2Value&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField2Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField2Value"