<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>NetFXHarmonics (Online Home of David Betz)</title>
    <description>David Betz' blog on AJAX and .NET Technology, Architecture, Elegance, and Training</description>
    <link>http://www.netfxharmonics.com/</link>
    <docs>http://backend.userland.com/rss</docs>
    <generator>RSS.NET: http://www.rssdotnet.com/</generator>
    <creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/FXHarmonics" type="application/rss+xml" /><item>
      <title>Minima 3.0 Released</title>
      <description>&lt;p&gt;Every few months I like to release a new open-source project or at least a new major revision of an existing project. Today I would like to introduce Minima 3.0.&amp;nbsp; This is a completely new Minima Blog Engine that is built on WCF, that is factored into various controls and that introduces a completely new model for ASP.NET development.&lt;/p&gt; &lt;h4&gt;As a Training Tool&lt;/h4&gt; &lt;p&gt;Normally I leave this for last, but this time I would like to immediately start off by mention how Minima 3.0 may act as a training tool. This will give you a good idea to Minima 3.0's architecture.&amp;nbsp; Here was the common "As a Training Tool" description for Minima 2.0 (a.k.a. Minima .NET 3.5):&lt;/p&gt; &lt;blockquote&gt;Minima 2.0 could be used as a training tool for ASP.NET, CSS theming, proper use of global.asax, integrating with Windows Live Writer, framework design guidelines, HttpModules, HttpHandlers, HttpHandlerFactories, LINQ, type organization, proper-SQL Server table design and naming scheme, XML serialization, and XML-RPC.NET usage.&lt;/blockquote&gt; &lt;p&gt;Here's the new "As a Training Tool" description for Minima 3.0:&lt;/p&gt; &lt;blockquote&gt;Minima 3.0 can be used as a training tool for the same concepts and technologies as Minima 2.0 as well as &lt;strong&gt;SOA principles, custom WCF service host factories, custom WCF behaviors, WCF username authentication, custom WCF declarative operation-level security, WCF exception shielding and fault management, custom WCF message header usage, WCF type organization, WCF-LINQ DTO transformation, enhanced WCF clients, using WCF sessions for Captcha verification, SQL Server 2005 schema security, XmlWriter usage, ASP.NET programmatic user control usage, custom configuration sections, WCF JavaScript clients, ASP.NET control JavaScript registration, JavaScript namespaces, WCF JSON services, WCF RSS services, ASP.NET templated databinding, and ASP.NET control componentization.&lt;/strong&gt;&lt;/blockquote&gt; &lt;p&gt;As you can see, it's an entirely new beast. As you should also be able to guess, I'm not going to use Minima for simply entry level .NET training anymore. With this new feature set, it's going to be my primary tool for intermediate and expert-level .NET training.&amp;nbsp; In the future, I'll post various blog entries giving lessons on various parts of Minima.&lt;/p&gt; &lt;h4&gt;New Features&lt;/h4&gt; &lt;p&gt;Since it's no where near the purpose of Minima, in no version have I ever claimed to have an extraordinary feature set. In fact, the actual end-user feature set of Minima 3.0 is fundamentally the same as &lt;a href="http://www.netfxharmonics.com/2007/08/Minima-NET-35-Blog-Engine"&gt;Minima 2.0&lt;/a&gt; except where features are naturally added because of the new architecture.&amp;nbsp; For example, it's now naturally a multi-blog environment with each blog allowed to have it's own blog discovery data, Google sitemap, and other things.&lt;/p&gt; &lt;h4&gt;Architecture&lt;/h4&gt; &lt;p&gt;There are really three major "pillars" to the architecture of Minima 3.0: &lt;strong&gt;WCF&lt;/strong&gt;, &lt;strong&gt;ASP.NET&lt;/strong&gt;, and Minima's use of NetFXHarmonics &lt;strong&gt;Themelia&lt;/strong&gt; (pronounced THE[as in the name "Thelma"]-&lt;strong&gt;MEH&lt;/strong&gt;-LEE-UH; Koine Greek for "foundations"). It will take more than one blog entry to cover every aspect of Minima's architecture, but for now I'll give a very brief overview.&amp;nbsp; I will explain the ASP.NET and Themelia pillars together.&lt;/p&gt; &lt;h4&gt;WCF Architecture&lt;/h4&gt; &lt;p&gt;The backend of Minima is WCF and is split up into various services to factor out some of the operations that occur within Minima. Of course, not every single possible operation is included as that would violate the "specificness" of SOA, but the core operations are intact.&lt;/p&gt; &lt;p&gt;The entire Minima security structure is now in WCF using a custom declarative operation-level security implementation.&amp;nbsp; To set security in Minima, all you have to do on the service side is apply the MinimaBlogSecurityBehavior attribute to an operation and you're all set.&amp;nbsp; Here's an example:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;[&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaBlogSecurityBehavior&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;PermissionRequired &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #2b91af"&gt;BlogPermission&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Retrieve&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)]
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;public &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntry &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;GetSingleBlogEntry&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;blogEntryGuid&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)
{
    &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//+ ...
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This handles all authorization, but authentication would happen long before an operation.&amp;nbsp; For this, the client must send extra information about the blog to the service, which is done via a custom MessageHeader, then on the service-side a custom UserNamePasswordValidator picks that up and does the authentication.&lt;/p&gt;
&lt;p&gt;The WCF implementation also includes a fault promotion system based on the one in &lt;a href="http://www.amazon.com/gp/product/0596526997?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0596526997"&gt;O'Reilly's Programming WCF by Juval Lowy&lt;/a&gt;. Everywhere an exception is thrown that is part of the operation's fault contract, a strongly-typed exception is thrown instead. &lt;/p&gt;
&lt;h4&gt;ASP.NET Architecture and Themelia Usage&lt;/h4&gt;
&lt;p&gt;In previous versions, Minima was basically a classic webform with a few MultiView and Repeater controls that you would customize.&amp;nbsp; In Minima 3.0, everything is changed.&amp;nbsp; Now Minima is a set of controls that work almost magically.&amp;nbsp; The controls are either server controls or compiled "FrameworkInitialize" user controls, which allows for control extensibility via inheritance and for packaging in an assembly.&amp;nbsp; Let me show you what I mean when I say these work also magically.&lt;/p&gt;
&lt;p&gt;In a classic ASP.NET webform I have a PlaceHolder:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;asp&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;:&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;PlaceHolder &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ID&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;"phMinimaBlog" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;runat&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;"server"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;asp&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;:&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;PlaceHolder&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;...and in the codebehind in the OnInit method I am adding the MinimaBlog control to it:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;phMinimaBlog&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Controls&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Add&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Web&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Control&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaBlog&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;());&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Done! You now have a fully functional blog.&amp;nbsp; Want a label list, an per-month archived entry list, or a recent entry list?&amp;nbsp; Just add more controls to strategically placed PlaceHolders (&lt;strong&gt;don't under estimate the useful of the PlaceHolder; it's a great way of decoupling your ASPX from your codebehind!&lt;/strong&gt;):&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;phLabelList&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Controls&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Add&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Web&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Control&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;LabelList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;());
&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;phArchivedEntryList&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Controls&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Add&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Web&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Control&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ArchivedEntryList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;());
&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;phRecentEntryList&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Controls&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Add&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Web&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Control&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;RecentEntryList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;());&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Huh?&amp;nbsp; How in the world did it even remotely know what blog to show?&amp;nbsp; This functionality is something that Themelia provides.&lt;/p&gt;
&lt;p&gt;Minima 3.0 is built on another project if mine called &lt;strong&gt;Themelia&lt;/strong&gt;, which includes as part of its functionality extreme HTTP pipeline hijacking.&amp;nbsp; Themelia was built for Minima, but are usable anywhere.&amp;nbsp; In fact, all my applications and web sites are built on it.&amp;nbsp; Just as how the various C# 3.0 features were built for LINQ, you use them outside of LINQ too.&amp;nbsp; Since this is a completely different project (to be released on CodePlex soon), I will only explain how Minima uses Themelia.&lt;/p&gt;
&lt;p&gt;Below is part of the web.config file for the sample web site included with Minima.&amp;nbsp; Notice that there's no "minima.web" config section, but, rather, it's all part of the Themelia configuration.&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;themelia.web&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;webSections&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;section &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;second&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;path&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/second/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;webSections&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;routing&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;components&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;type&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Minima.Web.Routing.Component.MinimaComponent, Minima.Web&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;registration&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;webSection&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;root&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;parameter &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;page&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;value&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;~/Default.aspx&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;parameter &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;blogGuid&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;value&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;19277C41-7E4D-4AE0-A196-25F45AC48762&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
                    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;webSection&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;second&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;parameter &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;page&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;value&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;~/SecondBlogPage.aspx&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;parameter &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;blogGuid&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;value&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;B23115B1-42E8-46A2-88DE-A56CE505E7D0&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
                    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
                &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;registration&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;components&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;fallThroughProcessors &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;comment&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;used when no http handlers match&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;add &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;type&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Minima.Web.Routing.BlogFallThroughProcessor, Minima.Web&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;priority&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;fallThroughProcessors&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;routing&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;themelia.web&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you're looking at is a completely new paradigm for ASP.NET development.&amp;nbsp; Instead of working with simple HTTP handlers, you are working with preprocessors, handler injectors, handler mappings, and fall-through processors.&amp;nbsp; You can safely ignore most of those fancy terms for now as they will be explained when the Themelia source is released.&amp;nbsp; However, you should be aware that Themelia also provides a web component system that allows you to turn all the fanciness I just mentioned into a nicely packaged component.&lt;/p&gt;
&lt;p&gt;This config file declares a "web section" (a Themelia concept which is like a "Web AppDomain"; the "root" web section always exists), then it registers the MinimaComponent and specifies a fallThroughProcessor.&amp;nbsp; The MinimaComponent registers all the required Minima functionality.&amp;nbsp; The fallThroughProcessor is what handles unhandled HTTP requests.&amp;nbsp; For example, in other web sites that I run, this is the WebFormFallThroughProcessor so that ASP.NET can handle it via the PageHandlerFactory, but in this case I want to catch all URLs in the "root" and "second" web sections so that Minima can route then using it's own magic (i.e. scan for a link, a label, or archive access).&lt;/p&gt;
&lt;p&gt;When registering the MinimaComponent, you also set all the parameters required for usage as can be seen in the above sample.&amp;nbsp; Therefore, the controls you place on a page just "know" what web section they are in and use the information for that particular web section (a while back I made an executive decision to only allow one configuration per component per web section; therefore, only one blog per web section).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;This is how I was able to get by with the above ASP.NET code where I just added new controls to a PlaceHolder and expected them to magically work.&amp;nbsp; But what if you wanted to show the recent blog entry from another blog in another web section in the "root" web section? (i.e. on your home page)?&amp;nbsp; Simple.&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;phRecentEntryListSecondary&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Controls&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Add&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Web&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Control&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;RecentEntryList
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;WebSection &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;"second"&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Heading &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;"Second Blog"&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;HeadingIsLink &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;true
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;});&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;By simply pointing the control to a different web section, you can show that web section's recent entry list in your own web section.&amp;nbsp; As you can see there are no blog IDs, GUIDs, or paths to mess with; everything is done via web sections.&lt;/p&gt;
&lt;p&gt;The MinimaComponent also uses a Themelia's handler injector to handle various HTTP requests differently.&amp;nbsp; The features of these handlers include url processing, blog entry image viewing, file downloading, blog discovery (i.e. rsd.xml creation), Windows Live Writer Manifest creation (i.e. wlwmanifest.xml), feed creation, Google site map creation, and MetaWeblog API support.&amp;nbsp; Each of these are web section-aware and therefore only show data for their own web section.&amp;nbsp; For example, /blogmap.xml would show a Google sitemap for the "root" web section while /second/blogmap.xml would show a Google sitemap for the "second" web section (not that paths and web section named need to match; they don't). So, a lot of stuff happens in a simple component registration.&lt;/p&gt;
&lt;p&gt;Now, since everything is componentized, how are things customized?&amp;nbsp; Simple: use CSS.&amp;nbsp; If you are still hacking your HTML to get a certain visual result, then you seriously need to upgrade your skill set and take some notes from &lt;a href="http://www.csszengarden.com"&gt;www.csszengarden.com&lt;/a&gt;.&amp;nbsp; They have literally thousands of insane designs for their website, but every single web site design is based on the exact same XHTML structure.&amp;nbsp; This is how professions do web development.&amp;nbsp; So, if you want to modify the look of your blog, do it in CSS.&amp;nbsp; Tightly-coupling two completely different world (in this case, structure and view) is just about always a bad idea.&lt;/p&gt;
&lt;p&gt;However, if you wanted to completely revamp the way the control worked all you have to do is create a new ITemplate and set the CustomPostTemplateType or CustomCommentTemplateType property with that template's type.&amp;nbsp; That template will then be used in control rendering.&amp;nbsp; If you aren't sure how to do this, then Minima is a good example of how you can create powerful controls.&amp;nbsp; Just look at how Minima creates the default ITemplate entities internally.&amp;nbsp; You can also customize little things as well by setting more trivial properties as seen in the above code sample.&lt;/p&gt;
&lt;p&gt;Remember that this is just a simple overview of Minima 3.0.&amp;nbsp; In the future I will write slowly introductions to the various portions of Minima and when Themelia is released, I will be writing about that as well.&amp;nbsp; For now, just go get Minima 3.0 and play with it.&lt;/p&gt;
&lt;h4&gt;Setup&lt;/h4&gt;
&lt;p&gt;Setup instructions can be seen on CodePlex (see link below), however, I would like to mention that you &lt;strong&gt;must&lt;/strong&gt; have server certificates Setup for any WCF security to work.&amp;nbsp; WCF doesn't allow you to send credentials over the wire unprotected.&amp;nbsp; To setup the certificates, see &lt;a href="http://notgartner.wordpress.com/2007/09/06/using-certificate-based-authentication-and-protection-with-windows-communication-foundation-wcf/"&gt;this blog entry&lt;/a&gt;.&amp;nbsp; This guy should get some sort of award for writing such an easy to follow explanation.&lt;/p&gt;
&lt;h4&gt;Links&lt;/h4&gt;
&lt;ul&gt;
&lt;li class="code-base"&gt;&lt;a href="http://www.codeplex.com/Minima"&gt;Minima 3.0 on CodePlex&lt;/a&gt; 
&lt;li&gt;&lt;a href="http://notgartner.wordpress.com/2007/09/06/using-certificate-based-authentication-and-protection-with-windows-communication-foundation-wcf/"&gt;Setting up Certificates&lt;/a&gt; 
&lt;li class="code-base"&gt;Like Blogging? See my &lt;a href="http://www.netfxharmonics.com/2008/03/Squid-Data-Feed-Framework-for-NET-35"&gt;Squid Micro-Blogging Library&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/FXHarmonics?a=SD2Iw5"&gt;&lt;img src="http://feeds.feedburner.com/~a/FXHarmonics?i=SD2Iw5" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=nlD6bH"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=nlD6bH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=wOVelH"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=wOVelH" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=GM3cuh"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=GM3cuh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/FXHarmonics/~4/296957643" height="1" width="1"/&gt;</description>
      <link>http://feeds.feedburner.com/~r/FXHarmonics/~3/296957643/Minima-30-Released</link>
      <author>David Betz &lt;dfb@davidbetz.net&gt;</author>
      <pubDate>Fri, 23 May 2008 20:52:16 GMT</pubDate>
    <feedburner:origLink>http://www.netfxharmonics.com/2008/05/Minima-30-Released</feedburner:origLink></item>
    <item>
      <title>Architectural Overview: Using LINQ in WCF</title>
      <description>&lt;p&gt;Today I would like to give an architectural overview of my usage of LINQ.&amp;#160; This may actually become the first in a series of architectural discussions on various .NET and AJAX technologies.&amp;#160; In this discussion, I'm going to be talking about the architecture of the next revision of my training blog engine, Minima.&amp;#160; Since the core point of any system is that which goes into and comes out of the system, the goal of this commentary will be to get to the point where LINQ projects data into WCF DTOs.&amp;#160; Let me start by explaining how I organize my types.&amp;#160; Some of you will find this boring, but it's amazing how many times I get questions on this topic.&amp;#160; For good reason too!&amp;#160; These questions show that a person's priorities are in the right place as your type, namespace, and file organization is critical to the manageability and architectural clarity of your system. &lt;/p&gt;  &lt;p&gt;However, before we get started, let me state briefly that as I've stated in my post entitled &lt;a href="http://www.netfxharmonics.com/2007/10/SQL-Server-Database-Model-Optimization-for-Developers"&gt;SQL Server Database Model Optimization for Developers&lt;/a&gt;, when you design your database structure you should design it with your O/R mapper in mind.&amp;#160; If you don't, then you will probably fall into all kinds of problems as my post describes.&amp;#160; This is incredibly important, however, if you keep to normal everyday normalization procedures, you are probably doing OK for the most part anyway.&amp;#160; Since I've written about that before, there's no reason for me to go into detail here.&amp;#160; Just know that, if you database design sucks, your application will probably suck too.&amp;#160; Don't built your house on the sand. &lt;/p&gt;  &lt;p&gt;In terms of LINQ, I actually use the VS2008 &amp;quot;LINQ to SQL Classes&amp;quot; template to create the LINQ information.&amp;#160; In most every other area of technology, it's a good practice to avoid wizards and templates like the plague, but when it comes to O/R mapping, you &lt;strong&gt;need&lt;/strong&gt; to be using an automated tool.&amp;#160; If your O/R mapper requires you to do any work (...NHibernate...*cough*cough*), then you can't afford to work with it.&amp;#160; You need to be focusing on the business logic of your system, not playing around with mechanical nonsense.&amp;#160; As I've said in other contexts, stored procedures and ad hoc SQL are forms of unmanaged code.&amp;#160; When you are managing the mechanics of a system yourself, it's, by definition, unmanaged.&amp;#160; Stored procedures and ad hoc SQL are to LLBLGen/LINQ as ASP/PHP is to ASP.NET as C++ is to .NET languages.&amp;#160; If you are managing the mechanical stuff yourself, you are working with unmanaged code.&amp;#160; When it comes to using managed code, in the context of database access, this is the point of an O/R mapper.&amp;#160; Furthermore, if the O/R mapping software you are using requires you to write up templates or do manual mapping, that's obviously not completely managed code. &lt;/p&gt;  &lt;p&gt;Now when I create a LINQ classes I will create one for each &amp;quot;&lt;em&gt;architectural domain&lt;/em&gt;&amp;quot; of the system that I deem necessary.&amp;#160; For example, in a future release of Minima, there will be a LINQ class to handle my HttpHandler and UrlRewriting subsystem and another LINQ class to handle blog interaction.&amp;#160; There needs to be this level of flexibility or my WCF services will know too much about my web environment and my web site (a WCF &lt;em&gt;client&lt;/em&gt;) will then have direct access to the data which the WCF service is intended to abstract.&amp;#160; Therefore, there will be a LINQ class for web site specific mechanics and another LINQ class for service specific mechanics.&amp;#160; Also, when I create the class for a particular domain I will give it a simple name with the suffix of LINQ.&amp;#160; So, my Minima core LINQ class is CoreLINQ.cs and my Minima service LINQ class is ServiceLINQ.cs.&amp;#160; Simple. &lt;/p&gt;  &lt;p&gt;Upon load of the LINQ designer and either after or before I drop in the specific tables required in that particular architectural domain.&amp;#160; Then I'll set my context namespace to &amp;lt;SimpleName&amp;gt;.Data.Context and my entity namespace to &amp;lt;SimpleName&amp;gt;.Data.Entity.&amp;#160; For example, in the Minima example, I'll then have Core.Data.Context and Core.Data.Entity.&amp;#160; One may argue that there's nothing really going on in Core.Data.Context to which I much respond: yeah, well there's already a lot going on in Core.Data (other data related non-LINQ logic I would create) and Core.Data.Entity.&amp;#160;&amp;#160; The reason I say &amp;quot;after or before I drop in the specific tables&amp;quot; is to emphasize the fact that you can change this at a later point.&amp;#160; It's important to keep in mind at this point that LINQ doesn't automatically update its schema with the schema from your database.&amp;#160; LLBLGen Pro does have this feature built in and it does the refreshing in a masterful way, but currently LINQ doesn't have this ability.&amp;#160; Therefore, to do a refresh, you need to do a &amp;quot;CTRL-A, Delete&amp;quot;, to delete all the tables, do a refresh in Server Explorer, and then just re-add them.&amp;#160; It's not much work. &lt;/p&gt;  &lt;p&gt;Now, moving on to using LINQ.&amp;#160; When I'm working with both LINQ entities (or LLBLGen entities or whatever) and WCF DTOs in my WCF service, I do not bring in the LINQ entity namespace.&amp;#160; The ability to import types in from another namespace is one of the most powerful set under appreciated features in all of .NET (um.. JavaScript needs them!), however, when you have a Person entity in LINQ and a Person DTO, things can get confusing fast.&amp;#160; Therefore, to avoid all potential conflicts, my import is left out and I, instead, keep a series of type aliases at the top of my service classes just under the namespace imports.&amp;#160; Notice also the visual signal in the BlogEntryXAuthor table name.&amp;#160; This tells the developer that this is a many-to-many linking table.&amp;#160; In this case it's in the database schema, but if it weren't in there, I could easily alias it as BlogEntryXAuthorLINQ without affecting anyone else.&lt;/p&gt;  &lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;System&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;System&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Collections&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Generic&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;System&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Linq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;System&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Text&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Context&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//+
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;AuthorLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Author&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;CommentLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Comment&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Blog&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntryLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntry&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntryUrlMappingLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntryXAuthor&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntryXAuthorLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;BlogEntryXAuthor&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;LabelLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Label&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;LabelXBlogEntryLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;LabelXBlogEntry&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;UserRightLINQ &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Data&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Entity&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;UserRight&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//+&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Next, since we are in the context of WCF, we need to discussion validation of incoming information.&amp;#160; The following method is an implementation of a WCF service operation.&amp;#160; As you can see, when a user sends in an e-mail address, there is an immediate validation on the e-mail address that retrieves the author's LINQ entity.&amp;#160; This is why the validation isn't being done in a WCF behavior (even though there are tricks to get data from a behavior too!)&amp;#160; You may also note my camelCasing of instances of LINQ entities.&amp;#160; The purpose of this is to provide an incredibly obvious signal to the brain that this is an object, not simply a type (...as is the point of almost all the Framework Design Guidelines-- &lt;a href="http://www.amazon.com/gp/product/0321246756?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321246756"&gt;buy the book&lt;/a&gt;!; 2nd edition &lt;a href="http://www.amazon.com/gp/product/0321545613?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321545613"&gt;due Sept 29 '08&lt;/a&gt;)&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//- @GetBlogListForAuthor -//
&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;public &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;List&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Blog&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;GetBlogListForAuthor&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;emailAddress&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)
{
    &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;using &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ServiceLINQDataContext &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ServiceLINQDataContext&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaConfiguration&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;DatabaseConfiguration&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;))
    {
        &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//+ check existence of blog
        &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;AuthorLINQ &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
        &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Validator&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;EnsureAuthorExists&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;emailAddress&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;out &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;);
        &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//+
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;return &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Blogs&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Where&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;== &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaConfiguration&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Select&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Blog
        &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;CreateDate &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogCreateDate&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Description &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogDescription&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;PrimaryUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogPrimaryUrl&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedTitle &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Guid &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogGuid&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Title &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedUrl
        &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;})&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;ToList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;();
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;It would probably be a good idea at this point to step into the Validator class to see what's really going on here.&amp;#160; As you can see in the following class I have two methods (in reality there are dozens!) and most of it should be obvious.&amp;#160; The validation is obviously in the second method, however, it's the first one that's being directly called.&amp;#160; Notice two things about this: First, notice that I'm passing in my DataContext.&amp;#160; This is to completely obliterate any possibilities of overlapping DataContexts and, therefore, any strange locking issues.&amp;#160; Second, notice that I'm pre-registering my messages in a strongly typed Message class(notice also that the members of Message are &lt;strong&gt;not&lt;/strong&gt; static-- the magic of const.)&amp;#160; This last piece could easily be done in a way that provides for nice localization.&lt;/p&gt;

&lt;p&gt;Now moving on to the actual validation.&amp;#160; Unless I'm desperately trying to inline some code, I normally declare the LINQ criteria prior to the actual link statement.&amp;#160; Of course, this is exactly what the Func&amp;lt;T1, T2&amp;gt; delegate is doing.&amp;#160; Notice also that I try to bring the semantics of the criteria into the name of the object.&amp;#160; This really helps in in making many of your LINQ statements read more naturally: &amp;quot;db.Person.Where(hasEmployees)&amp;quot;.&lt;/p&gt;

&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #90ee90"&gt;namespace &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Minima&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Service&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Validation
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
    &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;internal static class &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Validator
    &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
        &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//- ~Message -//
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;internal class &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Message
        &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
            &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;public const &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;InvalidEmail &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;&amp;quot;Invalid author Email&amp;quot;&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
        }

        &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//- ~EnsureAuthorExists -//
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;internal static void &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;EnsureAuthorExists&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorEmail&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;out &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;AuthorLINQ &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ServiceLINQDataContext &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)
        {
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;EnsureAuthorExists&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorEmail&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;out &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Message&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;InvalidEmail&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;);
        }

        &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;//- ~EnsureAuthorExists -//
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;internal static void &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;EnsureAuthorExists&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorEmail&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;out &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;AuthorLINQ &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;message&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;ServiceLINQDataContext &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)
        {
            &lt;/span&gt;&lt;span style="background: #202020; color: #2b91af"&gt;Func&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;AuthorLINQ&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;, &lt;/span&gt;&lt;span style="background: #202020; color: #2b91af"&gt;Boolean&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorExists &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;x &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;x&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;AuthorEmail &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;== &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorEmail&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;;
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Authors&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;SingleOrDefault&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorExists&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;);
            &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;if &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;authorLinq &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;== &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;null&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)
            {
                &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;FaultThrower&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;ThrowArgumentException&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;message&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;);
            }
        }
    }
}&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;In the actual query itself, you can see that the semantics of the method is that a maximum of one author should be returned.&amp;#160; Therefore, I'm able to use the Single or SingleOrDefault methods.&amp;#160; Note that if you use these and you return more than one entity, an exception will be throw as Single and SingleOrDefault only allow what their name implies.&amp;#160; In this case here, AuthorEmail is the primary key in the database and, by definition, there can be only one (at this point I'm sure about 30% of you are doing &lt;a href="http://www.imdb.com/title/tt0091203/"&gt;Sean Connery&lt;/a&gt; impressions).&amp;#160; The difference between Single and SingleOrDefault is simple: when the criteria is not met, Single throws an exception and SingleOrDefault returns the type's default value.&amp;#160; The default of a type is that which the C# &amp;quot;&lt;a href="http://msdn2.microsoft.com/en-us/library/xwth0h0d(VS.80).aspx"&gt;default&lt;/a&gt;&amp;quot; keyword will return.&amp;#160; In other words, a reference type will be null and a struct will be something else (i.e. 0 for Int32).&amp;#160; In this case, I'm dealing with my AuthorLINQ class, which is obviously a reference type, and therefore I need to check null on it.&amp;#160; If it's null, then that author doesn't exist and I need to throw a fault (which is what my custom FaultThrower class does).&amp;#160; What's a fault?&amp;#160; That's a topic for a different post. &lt;/p&gt;

&lt;p&gt;As you can see from the method signatures, not only is the author e-mail address being validated, the LINQ entity is being returned to the caller via an out parameter.&amp;#160; Once I have this authorLinq entity, then I can proceed to use it's primary key (AuthorId) in various other LINQ queries.&amp;#160; It's critical to remember that you always want to make sure that you are only using validated information.&amp;#160; If you aren't, then you have no idea what will happen to your system.&amp;#160; Therefore, you should ignore all IDs that are sent into a WCF service operation and use only the validated ones.&amp;#160; A thorough discussion of this topic is left for a future discussion. &lt;/p&gt;

&lt;p&gt;Now we are finally at the place where LINQ to WCF projection happens.&amp;#160; For clarity, here it is again (no one likes to scroll back and forth):&lt;/p&gt;

&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #90ee90"&gt;return &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Blogs&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Where&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;== &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaConfiguration&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;)&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Select&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Blog
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;CreateDate &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogCreateDate&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Description &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogDescription&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;PrimaryUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogPrimaryUrl&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedTitle &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Guid &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogGuid&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Title &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedUrl
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;})&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;ToList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;();&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;The basics flow of this are as follows: In DataContext db, in the Blogs table, pull sub-set where PersonId == AuthorId, then select transform that data into a new type.&amp;#160; The DTO projection is obviously happening in the Select method.&amp;#160; This method is akin to a SELECT in SQL.&amp;#160; My point in saying that is to make sure that you are aware that SELECT is &lt;strong&gt;not&lt;/strong&gt; a filter; that's what Where does.&amp;#160; After execution of the Where method as well as after execution of the Select method, you have an IQueryable&amp;lt;Blog&amp;gt; object, which contains information about the query, but no actual data yet.&amp;#160; LINQ defers execution of SQL statements until they are actually used.&amp;#160; In this case, the data is actually being used when the ToList method is called.&amp;#160; This of course returns a list of List&amp;lt;Blog&amp;gt;, which is exactly what this service operation should do.&amp;#160; What's really nice about this is that WCF loves List&amp;lt;T&amp;gt;.&amp;#160; It's not a big fan of Collection&amp;lt;T&amp;gt;, but List&amp;lt;T&amp;gt; is it's friend.&amp;#160; Over the wire it's an Array and when it's being used by a WCF client, it's also a List&amp;lt;T&amp;gt; object.&lt;/p&gt;

&lt;p&gt;That LINQ statement was done using what's called the extension method syntax, but it could have also been written using query expression syntax:&lt;/p&gt;

&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #90ee90"&gt;return &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;from &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;in &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;db&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Blogs
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;where &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;== &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;MinimaConfiguration&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogId
        &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;select new &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;Blog
        &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;CreateDate &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogCreateDate&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Description &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogDescription&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;PrimaryUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogPrimaryUrl&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedTitle &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Guid &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogGuid&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Title &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogTitle&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
            &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FeedUrl &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;BlogFeedUrl
        &lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;})&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;ToList&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;();&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;This yields the same result, but I opt for the expression method syntax for more native .NET readability and for method chaining.&amp;#160; I do, however, use query expression syntax when I'm doing SQL joins.&amp;#160; In that situation, the query expression syntax would seem more readable to SQL developers (which is, hopefully, all of us).&lt;/p&gt;

&lt;p&gt;In closing I should mention something that I know people are going to ask me about: To project from WCF DTO to LINQ you do the exact same thing.&amp;#160; LINQ isn't a database-specific technology.&amp;#160; You can LINQ between all kinds of things.&amp;#160; Though I use LINQ for my data access in many projects, most of my LINQ usage is actually for searching lists, combining to lists together, or modifying the data that gets bounds to the interface.&amp;#160; It's incredibly powerful.&lt;/p&gt;

&lt;p&gt;Moving into a non-Minima example, if, for example, you needed to have a person's full name in a WPF ListBox and the name-specific LINQ properties you have are FirstName and LastName property, instead of doing tricks in your ItemTemplate, you can just have your ItemsSource use LINQ to sew the FirstName and LastName together.&lt;/p&gt;

&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;lstPerson&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;ItemsSource &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;personList&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Select&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;(&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;new
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;{
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FullName &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;FirstName &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;+ &lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;&amp;quot; &amp;quot; &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;+ &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;LastName&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;PostalCode&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;,
    &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Country &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;= &lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;p&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Country &lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;?? &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;String&lt;/span&gt;&lt;span style="background: #202020; color: silver"&gt;.&lt;/span&gt;&lt;span style="background: #202020; color: #f2f0df"&gt;Empty
&lt;/span&gt;&lt;span style="background: #202020; color: #eeeeee"&gt;});&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;The really sweet part about this is the fact that LINQ entities implement the INotifyPropertyChanged interface, so when doing WPF data binding, WPF will automatically update the ListBox when the data changes!&amp;#160; Of course, this doesn't help you if you are doing a seriously SOA system.&amp;#160; Therefore, my DTOs normally implement INotifyPropertyChanged as well.&amp;#160; This is not a WPF-specific interface (it lives in System.ComponentModel) and therefore does &lt;strong&gt;not&lt;/strong&gt; tie the business object to any presentation.&lt;/p&gt;

&lt;p&gt;That should show you a bit more of how LINQ can work with all kinds of stuff.&amp;#160; Therefore, it shouldn't be hard to figure out how to project from a WCF DTO to LINQ. You could literally copy/paste the LINQ -&amp;gt; DTO code and just switch around a few names.&lt;/p&gt;

&lt;p&gt;If you are new to LINQ, then I recommend the book &lt;a href="http://www.amazon.com/gp/product/1590597893?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597893"&gt;Pro LINQ by Joseph C. Rattz Jr&lt;/a&gt;. However, if you are already using LINQ or want a view into its internal mechanics, then I must recommend &lt;a href="http://www.amazon.com/gp/product/1933988169?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1933988169"&gt;LINQ in Action&lt;/a&gt; by Fabrice Marguerie, Steve Eichert, and Jim Wooley.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notice: As of May 23, 2008 I will be available for AJAX, WCF, WPF, LINQ, ASP.NET *work from home* consulting on a part-time basis.&amp;#160; Please drop me an e-mail for more information.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/FXHarmonics?a=VdpirL"&gt;&lt;img src="http://feeds.feedburner.com/~a/FXHarmonics?i=VdpirL" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=s5MbfnG"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=s5MbfnG" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=qJ112uG"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=qJ112uG" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=7F15W3g"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=7F15W3g" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/FXHarmonics/~4/268395542" height="1" width="1"/&gt;</description>
      <link>http://feeds.feedburner.com/~r/FXHarmonics/~3/268395542/Architectural-Overview-LINQ-in-WCF</link>
      <author>David Betz &lt;dfb@davidbetz.net&gt;</author>
      <pubDate>Fri, 11 Apr 2008 08:24:25 GMT</pubDate>
    <feedburner:origLink>http://www.netfxharmonics.com/2008/04/Architectural-Overview-LINQ-in-WCF</feedburner:origLink></item>
    <item>
      <title>Spring 2008 Sabbatical</title>
      <description>&lt;p&gt;Starting May 23rd, I'm starting another sabbatical to work on my company projects, to continue my &lt;a href="from "&gt;seminary work&lt;/a&gt;, and to work on my book (to be clear: sabbatical != vacation).&amp;#160; During this time I will be accepting part-time AJAX, WCF, ASP.NET (no graphics work!-- hire a professional graphic designer, they are worth the money!), or general C# 3.0 and .NET 3.5 telecommuting consulting.&amp;#160; I'll assist in projects, but I'm not going to be able to work as senior architect on any projects.&amp;#160; Also remember, as a web developer, it's my duty to make sure my projects work in Mozilla, Opera, Safari, and IE, and is in no way IE-specific.&amp;#160; IE-only environments are the absolute most difficult to work with.&lt;/p&gt;  &lt;p&gt;Also keep in mind that this is 2008, not 1988 and the primary purpose of modern technology is to allow us to have simpler lives and just about every single aspect of our technology has it's root in the Internet allowing us to communication from anywhere.&amp;#160; What's the point in having web casting and online meeting abilities or in having online white boarding or web-based project management software, or even Google Office if you aren't going to use them in a meaningful way?&amp;#160; Why have e-mail at all if you are going to absolutely rely on the ability to go to the person's office?&amp;#160; The addiction to physical contact is something that needs to be broken in the 21st century.&amp;#160; Stop managing with your physical &amp;quot;field of view&amp;quot; and start managing by results.&lt;/p&gt;  &lt;p&gt;I'm a web developer/architect, not a piano mover; I don't need to be in a physical office.&amp;#160; If you are into technology at all, you are into moving your physical resources into a logical cloud.&amp;#160; If I've said it once, I've said it a million times: your associates are your greatest resource and should, therefore, be even more in a logical cloud (as they are humans and would appreciate it more!)&amp;#160; It is inconsistent to pursue logical management of resources and require physical management of personnel.&amp;#160; Not only that, but it costs a lot less (no office space required!)&amp;#160; If your employees don't have enough discipline to work from home, what makes you think they are working in their cube?&amp;#160; Unless you are working off the failed notion of &amp;quot;hourly management&amp;quot; instead of being a results-oriented manager, you won't have a problem with 100% telecommuting.&amp;#160; Results matter, not &amp;quot;time&amp;quot;.&amp;#160; Also, if you don't trust your employees, well... maybe you hired the wrong people (or maybe have trust issues in general?)&amp;#160; Trust is the foundation of all life.&amp;#160; I could speak volumes on this topic, but I'll leave that to the expert: &lt;a href="http://www.fourhourworkweek.com/blog/"&gt;Timothy Ferris&lt;/a&gt;.&amp;#160; See &lt;a href="http://www.fourhourworkweek.com/blog/"&gt;his blog&lt;/a&gt; or get his book for more information.&amp;#160; I'm only an anonymous disciple of his, he is the master and authority on this topic.&amp;#160; Therefore, send your flames (read: insecurities) his way (after you read &lt;a href="http://www.amazon.com/gp/product/0307353133?ie=UTF8&amp;amp;tag=httpwwwnetfxh-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0307353133"&gt;his book&lt;/a&gt;!-- &lt;a href="http://www.audible.com/adbl/site/products/ProductDetail.jsp?productID=BK_BLAK_002202&amp;amp;BV_UseBVCookie=Yes"&gt;audio also available&lt;/a&gt;; they are both worth 100x their weight in gold!)&amp;#160; See also, &lt;a href="http://www.hanselminutes.com/default.aspx?showID=87"&gt;Scott Hanselman's interview with Timothy Ferris&lt;/a&gt;.&amp;#160; His &lt;a href="http://www.youtube.com/user/masterlock77"&gt;YouTube page&lt;/a&gt; is also available.&lt;/p&gt;  &lt;p&gt;With regards to the book, let me simply say that it's generically about AJAX communication and I'm not going to give out too many specific details on the project at this point, but I will say this: AJAX + SOA - CSS + &lt;a href="http://prototypejs.org/"&gt;Prototype&lt;/a&gt; + (ASP.NET Controls) - (ASP.NET AJAX) + WCF + (.NET 2.0 Service Interop) + Silverlight + Development Tools.&amp;#160; Also, &lt;em&gt;I reserve the right to turn it into a video series (likely), make it a completely learning set of reading + video series (even more likely!), or to completely chuck the project.&lt;/em&gt;&amp;#160; I don't like to do things the classical way, so whatever I do, you can bet on the fact that I won't do the traditional &amp;quot;book&amp;quot;.&amp;#160; As I've always said, the blog is the new book, but for this I think I may use a different paradigm.&amp;#160; I've turned down two book offers so far because I absolutely &lt;strong&gt;refuse&lt;/strong&gt; to throw more paper on a bookshelf or do something that's been done a million times before.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;If you are moving from ASP to ASP.NET, from PHP to ASP.NET, from ASMX to WCF 3.5 or want to add AJAX to your solutions drop me an e-mail and let's talk&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/FXHarmonics?a=k4UFlF"&gt;&lt;img src="http://feeds.feedburner.com/~a/FXHarmonics?i=k4UFlF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=2zN9z1G"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=2zN9z1G" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=sStMryG"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=sStMryG" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=oL9ZYWg"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=oL9ZYWg" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/FXHarmonics/~4/267778798" height="1" width="1"/&gt;</description>
      <link>http://feeds.feedburner.com/~r/FXHarmonics/~3/267778798/Spring-2008-Sabbatical</link>
      <author>David Betz &lt;dfb@davidbetz.net&gt;</author>
      <pubDate>Wed, 09 Apr 2008 22:31:18 GMT</pubDate>
    <feedburner:origLink>http://www.netfxharmonics.com/2008/04/Spring-2008-Sabbatical</feedburner:origLink></item>
    <item>
      <title>NetFXHarmonics on CodePlex</title>
      <description>&lt;p&gt;Well, I finally broke down.&amp;nbsp; My public projects are now freely available for download on CodePlex.&amp;nbsp; Below is a list of the current projects on CodePlex&lt;/p&gt; &lt;p&gt;Here are the current projects on CodePlex:&lt;/p&gt; &lt;ul&gt; &lt;li class="project"&gt;&lt;a href="http://www.codeplex.com/DevServer"&gt;NetFXHarmonics DevServer&lt;/a&gt;  &lt;li class="project"&gt;&lt;a href="http://www.codeplex.com/Squid"&gt;Squid RSS Services&lt;/a&gt; (Both the February 2007 and March 2008 Edition) &lt;li class="project"&gt;&lt;a href="http://www.codeplex.com/Minima"&gt;Minima Blog Engine&lt;/a&gt; (Both the February 2007 and August 2007 Edition) &lt;li class="project"&gt;&lt;a href="http://www.codeplex.com/EsvBibleWSv2"&gt;ESV Bible Web Service 2.0 Framework&lt;/a&gt;  &lt;li class="project"&gt;&lt;a href="http://www.codeplex.com/DojrDotNet"&gt;Dojr.NET&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="project"&gt;As far as creating "releases", these are shared-source/open-source projects and in the model I'm following "releases" are always going to be obsolete.&amp;nbsp; Therefore, I will provide ZIP versions of the archived major revisions of a project and the current revision will always be available as source code.&amp;nbsp; The only exception to this may be DevServer, which I may do monthly releases or releases based upon major upgrades.&amp;nbsp; I'm currently working on new major revisions for a few other projects and when they are completed, I will then post them on to CodePlex as well.&lt;/p&gt; &lt;p class="project"&gt;As a reminder, my projects are always architected to follow the current best-practices and idiots for a particular technology and are therefore often fully re-architected based on the current technology.&amp;nbsp; The reason I do this is for the simple reason that my core specialty is training (technology or not) and that's the driving principle in my projects.&amp;nbsp; Therefore, on each of my projects there is a "As a Training Tool" section that will explain that projects technology and architecture as well as what else you might be able to learn from it.&lt;/p&gt; &lt;p class="project"&gt;As a final note, &lt;a href="http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Using%20TortoiseSVN%20with%20CodePlex&amp;amp;referringTitle=Source%20control%20clients"&gt;SVNBridge&lt;/a&gt; is working OK for me and has really helped me get over the CodePlex hurdle.&amp;nbsp; &lt;a href="http://www.hanselman.com/"&gt;Scott Hanselman&lt;/a&gt; was kind enough to encourage me to try SVNBridge again.&amp;nbsp; I'm honesty glad I did.&amp;nbsp; The Team System 2008 Team Explorer client which integrated into Visual Studio works every now and again, but I got absolutely sick of everything locking up every time I would save a file.&amp;nbsp; Not even a check it!&amp;nbsp; A simple local save!&amp;nbsp; How people put up with "connected" version control systems is beyond me.&amp;nbsp; Do people not realize that Subversion does locking too?&amp;nbsp; Anyways, SVNBridge works great for both check outs and commits (we don't "check in" in the Subversion world-- we use transactional terminology).&amp;nbsp; If you want Visual Studio 2008 integration AND speed and power and flexibility with CodePlex, get &lt;a href="http://www.visualsvn.com/"&gt;VisualSVN&lt;/a&gt;.&amp;nbsp; It's an add-on for VS2008 that uses &lt;a href="http://tortoisesvn.tigris.org/"&gt;Tortoise&lt;/a&gt; behind the scenes.&amp;nbsp; With that, depending on my mood I can commit in both VS2008 (what I would do when working on refactoring or something) and in the Windows shell (what I would do when working with JavaScript files in the world's best JavaScript IDE: &lt;a href="http://www.flos-freeware.ch/notepad2.html"&gt;Notepad2&lt;/a&gt;).&lt;/p&gt; &lt;p class="project"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/FXHarmonics?a=J6o0Yw"&gt;&lt;img src="http://feeds.feedburner.com/~a/FXHarmonics?i=J6o0Yw" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=Hp8f7CG"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=Hp8f7CG" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=TlQY31G"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=TlQY31G" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/FXHarmonics?a=x0UvbGg"&gt;&lt;img src="http://feeds.feedburner.com/~f/FXHarmonics?i=x0UvbGg" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/FXHarmonics/~4/266795529" height="1" width="1"/&gt;</description>
      <link>http://feeds.feedburner.com/~r/FXHarmonics/~3/266795529/NetFXHarmonics-on-CodePlex</link>
      <author>David Betz &lt;dfb@davidbetz.net&gt;</author>
      <pubDate>Tue, 08 Apr 2008 21:59:23 GMT</pubDate>
    <feedburner:origLink>http://www.netfxharmonics.com/2008/04/NetFXHarmonics-on-CodePlex</feedburner:origLink></item>
    <item>
      <title>NetFXHarmonics DevServer Released</title>
      <description>&lt;p&gt;Two months ago started work on a project to help me in my AJAX and SOA development.&amp;nbsp; What I basically needed was a development web server that allowed me to start up multiple web servers at once, monitor server traffic, and bind to specific IP interfaces.&amp;nbsp; Thus, the creation of NetFXHarmonics DevServer.&amp;nbsp; I built it completely for myself, but others started to ask for it as well.&amp;nbsp; When the demand for it became stronger, I realized that I needed to release the project on the web.&amp;nbsp; Normally I would host it myself, but given the interest from the .NET community, I thought I would put it on CodePlex.&amp;nbsp; I've only cried twice seen I've put it on CodePlex, but I'll survive.&lt;/p&gt; &lt;p&gt;NetFXHarmonics DevServer is a web server hosting environment built on WPF and WCF technologies that allows multiple instances of Cassini-like web servers to run in parallel. DevServer also includes tracing capabilities for monitoring requests and responses, request filtering, automatic ViewState and ControlState parsing, visually enhanced HTTP status codes, IP binding modes for both local-only as well as remote access, and easy to use XML configuration. &lt;/p&gt; &lt;p&gt;Using this development server, I am able to simultaneously start multiple web sites to very quickly view everything that happens over the wire and therefore easily debug JSON and SOAP messages flying back and forth between client and server and between services.&amp;nbsp; This tool have been a tremendous help for me in the past few months to discover exactly why my services are tripping out without having to enable WCF tracing.&amp;nbsp; It's also been a tremendous help in managing my own web development server instances for all my projects, each having 3-5 web sites (or segregated service endpoints) each.&lt;/p&gt; &lt;p&gt;Let me give you a quick run down of the various features in NetFXHarmonics DevServer with a little discussion of each feature's usage:&lt;/p&gt; &lt;h4&gt;XML Configuration&lt;/h4&gt; &lt;p&gt;NetFXHarmonics DevServer has various projects (and therefore assemblies) with the primary being DevServer.Client, the client application which houses the application's configuration.&lt;/p&gt; &lt;p&gt;In the app.config of DevServer.Client, you have a structure that looks something like the following:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;jampad.devServer&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;jampad.devServer&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This is where all your configuration lives and the various parts of this will be explained in their appropriate contexts in the discussions that follow.&lt;/p&gt;
&lt;h4&gt;Multiple Web Site Hosting&lt;/h4&gt;
&lt;p&gt;In side of the jampad.devServer configuration section in the app.config file, there is a branch called &amp;lt;servers /&amp;gt; which allows you to declare the various web servers you would like to load.&amp;nbsp; This is all that's required to configure servers.&amp;nbsp; Each server requires a friendly name, a port, a virtual path, and the physical path.&amp;nbsp; Given this information, DevServer will know how to load your particular servers.&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;servers&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Sample Website 1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;port&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;2001&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"
            &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;virtualPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;physicalPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;C:\Project\DevServer\SampleWebsite1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS2&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Sample Website 2&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;disabled&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;true&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;port&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;2003&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"
            &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;virtualPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;physicalPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;C:\Project\DevServer\SampleWebsite2&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;servers&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;font style="background-color: #202020" color="#a4a4a4" face="Courier New"&gt;&lt;/font&gt;
&lt;p&gt;If you want to disable a specific server from loading, use the "disabled" attribute.&amp;nbsp; All disabled servers will be completely skipped in the loading process.&amp;nbsp; On the other hand, if you would like to load a single server, you can actually do this from the command line by setting a server key on the &amp;lt;server /&amp;gt; element and by accessing it via a command line argument:&lt;/p&gt;
&lt;p&gt;DevServer.Client.exe -serverKey:SampleWS1&lt;/p&gt;
&lt;p&gt;In most scenarios you will probably want to load various sets of servers at once.&amp;nbsp; This is especially true in properly architected service-oriented solutions.&amp;nbsp; Thus, DevServer includes a concept of startup profiles.&amp;nbsp; Each profile will include links to a number of keyed servers.&amp;nbsp; You configure these startup profiles in the &amp;lt;startupProfiles /&amp;gt; section.&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;startupProfiles &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;activeProfile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Sample&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Sample&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS2&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;startupProfiles&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This configuration block lives parallel to the &amp;lt;servers /&amp;gt; block and the inclusion of servers should be fairly self-explanatory.&amp;nbsp; When DevServer starts it will load the profile in the "activeProfile" attribute.&amp;nbsp; If the activeProfile block is missing, it will be ignored.&amp;nbsp; If the activeProfile states a profile that does not exist, DevServer will not load.&amp;nbsp; When using a startup profile, the "disabled" attribute on each server instance is ignored.&amp;nbsp; That attribute is only for non-startup profile usage.&amp;nbsp; An activeProfile may also be set via command line:&lt;/p&gt;
&lt;p&gt;DevServer.Client.exe -activeProfile:Sample&lt;/p&gt;
&lt;p&gt;This will override any setting in the activeProfile attribute of &amp;lt;startupProfiles/&amp;gt;.&amp;nbsp; In fact, the "serverKey" command line argument overrides the activeProfile &amp;lt;startupProfiles /&amp;gt; attribute as well.&amp;nbsp; Therefore, the order of priority is is as follows: command line argument override profile configuration and profile configuration overrides the "disabled" attribute.&lt;/p&gt;
&lt;p&gt;Most developers don't work on one project and with only client.&amp;nbsp; Or, even if they do, they surely have their own projects as well.&amp;nbsp; Therefore, you may have even more servers in your configuration:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpMainWS&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Main Website&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;port&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;7001&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"
        &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;virtualPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;physicalPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;C:\Project\ABCCorp\Website&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpKBService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;KB Service&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;port&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;7003&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"
        &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;virtualPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;physicalPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;C:\Project\ABCCorp\KnowledgeBaseService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpProductService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Product Service&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;port&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;7005&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"
        &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;virtualPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;/&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;physicalPath&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;C:\Project\ABCCorp\ProductService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;These would be grouped together in their own profile with the activeProfile set to that profile.&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;startupProfiles &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;activeProfile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorp&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorp&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpMainWS&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpKBService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpProductService&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;Sample&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS2&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;startupProfiles&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;What about loading servers from different profiles?&amp;nbsp; Well, think about it... that's a different profile:&lt;/p&gt;&lt;pre class="code vs2008-0308-code-background"&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;startupProfiles &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;activeProfile&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpWithSampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;profile &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;name&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;ABCCorpWithSampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"&lt;/span&gt;&lt;span style="background: #202020; color: cyan"&gt;SampleWS1&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;" &lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: #202020; color: #90ee90"&gt;server &lt;/span&gt;&lt;span style="background: #202020; color: #ff0080"&gt;key&lt;/span&gt;&lt;span style="background: #202020; color: #a4a4a4"&gt;=&lt;/span&gt;&lt;span style="background: #202020; color: #ff80c0"&gt;"