<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7459801763503956083</id><updated>2012-02-14T14:26:22.750-05:00</updated><category term='AOP'/><category term='LINQ'/><category term='LightSwitch'/><category term='Prism'/><category term='Dublin'/><category term='Dependency Injection'/><category term='SQL Server'/><category term='SharePoint'/><category term='Expression Blend'/><category term='.NET RIA Services'/><category term='Security'/><category term='Application Development'/><category term='Visual Studio 2010'/><category term='Ninject'/><category term='C# 3.0'/><category term='Windows Phone 7'/><category term='Visual Studio 2008'/><category term='WCF'/><category term='.NET 4.0'/><category term='Microsoft Patterns and Practices'/><category term='Unity'/><category term='NHibernate'/><category term='Design Patterns'/><category term='WPF'/><category term='Entity Framework'/><category term='Silverlight'/><category term='Windows 7'/><title type='text'>InitializeComponent();</title><subtitle type='html'>A .NET and Visual Studio blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>81</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4129513226474498116</id><published>2010-10-11T10:24:00.001-04:00</published><updated>2010-10-11T10:24:01.656-04:00</updated><title type='text'>Windows 7 Phone Hardware</title><content type='html'>&lt;p&gt;MSDN Channel 9 has posted a &lt;a href="http://channel9.msdn.com/posts/First-Look-Windows-Phone-7-Hardware" target="_blank"&gt;First Look video&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Phones are from Dell, LG, HTC and Samsung.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;amp;displaylang=en" target="_blank"&gt;Download the Development tools.&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4129513226474498116?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4129513226474498116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4129513226474498116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4129513226474498116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4129513226474498116'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/10/windows-7-phone-hardware.html' title='Windows 7 Phone Hardware'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6815533195361342348</id><published>2010-09-12T09:35:00.001-04:00</published><updated>2010-09-12T09:39:29.756-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>A Repository-like façade for Entity Framework – Part II</title><content type='html'>&lt;p&gt;This is the second post in this series.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://initializecomponent.blogspot.com/2010/09/repository-like-facade-for-mocking.html" target="_blank"&gt;Part 1&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The first thing we need to do to enable using our POCOs with EF 4.0 is to decide how we want to handle &lt;a href="http://msdn.microsoft.com/en-us/library/dd456848.aspx" target="_blank"&gt;change tracking&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/dd456855.aspx" target="_blank"&gt;lazy loading of our child collections&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;For now, let’s take full advantage of EF’s capabilities and allow it to generate the proxies for lazy loading and full change tracking.&lt;/p&gt;  &lt;p&gt;To do this, there are four requirements:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Each POCO must have an empty default constructor. &lt;/li&gt;    &lt;li&gt;Each property of the POCO must be declared virtual. &lt;/li&gt;    &lt;li&gt;The child collection properties must be of type ICollection&amp;lt;T&amp;gt;. &lt;/li&gt;    &lt;li&gt;New POCO objects must be instantiated with ObjectContext.CreateObject&amp;lt;T&amp;gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Since List&amp;lt;T&amp;gt; is an implementation of ICollection&amp;lt;T&amp;gt;, we can keep it for our collection, but we need to mark all the properties as virtual. Here are our entities:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:53751219-2650-4740-81a9-a420bff16852" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 720px; height: 397px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Entities.School&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; Department&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;long&lt;/span&gt;&lt;span style="color: #000000;"&gt; Id { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Name { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; List&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Courses { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; Course&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;long&lt;/span&gt;&lt;span style="color: #000000;"&gt; Id { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Name { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; Department Department { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;p&gt;Note that I have removed the code that kept the Department.Courses collection in sync, when the Course.Department is set. I had hoped that the proxy behavior would replace this “default” behavior, but it looks like from my testing that the proxy synchronization takes place, followed by the “base” behavior. This resulted in two entries being made in the Courses collection each time a Course was assigned to the Department. I removed the base behavior, which means that if the in-memory repository is used, the client code will need to synchronize the collection.&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next, we create the model. Right-click on the model canvas and select Generate Database from Model. This will create the DDL script to create the tables.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_dYh5X98iMTc/TIzXO2iGEOI/AAAAAAAAAHw/aQGRHGeqLiQ/s1600-h/2010-09-12-1%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2010-09-12-1" border="0" alt="2010-09-12-1" src="http://lh3.ggpht.com/_dYh5X98iMTc/TIzXPZrFWQI/AAAAAAAAAH0/lEBjzGgGDBE/2010-09-12-1_thumb%5B1%5D.png?imgmax=800" width="495" height="465" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next, blank out the Custom Tool property on the file properties for the EDMX file. This way, no code will be generated for your model. This means we need to write our own ObjectContext class. Many authors recommend creating strongly-type properties for exposing each ObjectSet (Departments, Courses). You can do that, but it isn’t very useful for our Repository interface. Rather, we will create Query&amp;lt;T&amp;gt; and SetOf&amp;lt;T&amp;gt; methods to return the appropriately typed IQueryable and ObjectSet, respectively.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:31bdcdeb-97ee-4fbb-9e1e-9fea8d78c1c8" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 834px; height: 681px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Data.Objects;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Model&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; PocoContext : ObjectContext&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; PocoContext(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; connectString)&lt;br /&gt;        : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;base&lt;/span&gt;&lt;span style="color: #000000;"&gt;(connectString)&lt;br /&gt;        {&lt;br /&gt;            ContextOptions.LazyLoadingEnabled &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;true&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type, ObjectQuery&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; roots &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type, ObjectQuery&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; ObjectSet&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; SetOf&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            ObjectQuery root;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (&lt;/span&gt;&lt;span style="color: #000000;"&gt;!&lt;/span&gt;&lt;span style="color: #000000;"&gt;roots.TryGetValue(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T), &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;out&lt;/span&gt;&lt;span style="color: #000000;"&gt; root))&lt;br /&gt;            {&lt;br /&gt;                var &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; CreateObjectSet&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;                roots[&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T)] &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; (ObjectSet&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;)root;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; (IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;)SetOf&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Finally, we create our Repository implementation.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:3701686e-b0ec-4dba-b4e3-81cf070af56e" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 834px; height: 800px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Model.School.Model2&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; Interfaces;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; SchoolRespository : BaseRepository&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; PocoContext context;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; SchoolRespository(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; connectString &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;name=Model2Container&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;)&lt;br /&gt;        {&lt;br /&gt;            context &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; PocoContext(connectString);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; context.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; T New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; context.CreateObject&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; SetNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; no need for this with SQL Server auto-numbering&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            context.SetOf&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().AddObject(obj);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            context.SetOf&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().DeleteObject(obj);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Commit()&lt;br /&gt;        {&lt;br /&gt;            context.SaveChanges();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is a test that shows how to use the SchoolRepository that we have created.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d0e38e6d-da8a-4be8-ac06-dba01bc26fde" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 834px; height: 950px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #000000;"&gt;        [TestMethod]&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Test_SchoolRepository()&lt;br /&gt;        {&lt;br /&gt;            IRepository repo &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; SchoolRespository();&lt;br /&gt;&lt;br /&gt;            var count &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().Count();&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;try&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            {&lt;br /&gt;                var math &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(d &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;                {&lt;br /&gt;                    d.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Mathematics&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;                });&lt;br /&gt;&lt;br /&gt;                var algebra &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(c &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;                {&lt;br /&gt;                    c.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algebra&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;                    c.Department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; math;&lt;br /&gt;                });&lt;br /&gt;&lt;br /&gt;                repo.Commit();&lt;br /&gt;&lt;br /&gt;                repo &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; SchoolRespository();&lt;br /&gt;                var course &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; (from c &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;in&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;                              &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; c.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algebra&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;                              select c).First();&lt;br /&gt;                Assert.IsNotNull(course);&lt;br /&gt;                Assert.IsTrue(course.Department.Id &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; math.Id);&lt;br /&gt;&lt;br /&gt;                var dept &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; (from d &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;in&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;                            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; d.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Mathematics&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;                            select d).First();&lt;br /&gt;                Assert.IsTrue(dept.Courses.Count &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;                Assert.IsTrue(dept.Courses[&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;] &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; course);&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;finally&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            {&lt;br /&gt;                repo &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; SchoolRespository();&lt;br /&gt;&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; remove course and dept&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;                &lt;br /&gt;                var course &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;                    .Where(o &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; o.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algebra&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;).FirstOrDefault();&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (course &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;) repo.Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(course);&lt;br /&gt;                &lt;br /&gt;                var dept &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;                    .Where(o &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; o.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Mathematics&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;).FirstOrDefault();&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (dept &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;) repo.Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(dept);&lt;br /&gt;                repo.Commit();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6815533195361342348?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6815533195361342348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6815533195361342348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6815533195361342348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6815533195361342348'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/09/repository-like-facade-for-mocking_12.html' title='A Repository-like façade for Entity Framework – Part II'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_dYh5X98iMTc/TIzXPZrFWQI/AAAAAAAAAH0/lEBjzGgGDBE/s72-c/2010-09-12-1_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-1622949268014282873</id><published>2010-09-09T17:07:00.001-04:00</published><updated>2010-09-12T09:39:05.112-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><title type='text'>A Repository-like façade for mocking Entity Framework</title><content type='html'>&lt;p&gt;While I know there are a lot of people in the ALT.NET community who like to mock Enitity Framework, that is not what I am talking about.&lt;/p&gt;  &lt;p&gt;The objective of this exercise is to develop an Interface that can be used by Business Logic to query and persist data as well as provide and in-memory “mock” for testing or prototyping without a database.&lt;/p&gt;  &lt;p&gt;The paradigm used is that of &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd861288.aspx" target="_blank"&gt;object model aggregates&lt;/a&gt; typically found in &lt;a href="http://en.wikipedia.org/wiki/Domain-driven_design" target="_blank"&gt;Domain-driven designs (DDD).&lt;/a&gt; This is fortunate because it is the model used by EF, where the aggregates are called &lt;a href="http://msdn.microsoft.com/en-us/library/dd412719.aspx" target="_blank"&gt;ObjectSets&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We want to take advantage of &lt;a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" target="_blank"&gt;LINQ&lt;/a&gt;, because this will allow the consumer of the &lt;a href="http://martinfowler.com/eaaCatalog/repository.html" target="_blank"&gt;Repository&lt;/a&gt; to add query operators prior to executing the query. The Repository will provide a &lt;strong&gt;Query&lt;/strong&gt; method, a &lt;strong&gt;New&lt;/strong&gt; method, an &lt;strong&gt;Add&lt;/strong&gt; method, a &lt;strong&gt;Remove&lt;/strong&gt; method and a &lt;strong&gt;Commit&lt;/strong&gt; method.&lt;/p&gt;  &lt;p&gt;I used the term “a repository-like facade” in the title of this post because traditionally a Repository provides access to a single Aggregate. I have decided to allow an EF Context, which might have several aggregates, to be wrapped by my Repository-implementation. The root aggregate type is determined by the Type parameter affixed to the method. In addition, I will provide a number of &lt;a href="http://en.csharp-online.net/Glossary:Definition_-_Convenience_method" target="_blank"&gt;convenience methods&lt;/a&gt; to chain some of these basic methods is a single method call.&lt;/p&gt;  &lt;p&gt;Here is the interface:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:5d56a6d6-5283-4e27-a6a5-668db8ee6c30" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 717px; height: 663px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Interfaces&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;interface&lt;/span&gt;&lt;span style="color: #000000;"&gt; IRepository&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; returns a query object for an aggregate root&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; returns a new object of the type requested&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        T New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; returns a new object of the type requested (with the next id set)&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        T Next&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; adds the object to the aggregate root&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; gets a new object and Adds it to the collection&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        T AddNew&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; gets a new object (with next id set) and Adds it to the collection&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        T AddNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; adds a new object with the next id, runs initializer and persists it&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        T CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(Action&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; initializer) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; remove an aggregate root&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; persists any changes&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Commit();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The following code is an abstract implementation of the convenience methods, which are independent of the actual method of creating the new objects and managing them in the context. The methods that are declared abstract are the ones that will need to be implemented by a concrete Repository.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Note: The exception handling in these code listings has been omitted for brevity.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:66c913d4-f931-4582-961e-dd2293bfe37b" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 720px; height: 319px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Interfaces&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; BaseRepository : IRepository&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; T New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; SetNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;abstract&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Commit();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; T Next&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            var obj &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            SetNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(obj);   &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; obj;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; T AddNew&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            var obj &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(obj);&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; obj;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; T AddNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            var obj &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; Next&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(obj);&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; obj;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; T CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(Action&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; initializer) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;where&lt;/span&gt;&lt;span style="color: #000000;"&gt; T : &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            var obj &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; AddNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (initializer &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;) initializer(obj);&lt;br /&gt;            Commit();&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; obj;&lt;br /&gt;        }      &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We can implement an in-memory repository that maintains each type of aggregate root in an ArrayList and uses the Type to find the correct List and operate on it accordingly. To simulate auto-numbered primary keys, we assume that auto-numbered entities will have a &lt;font face="Courier New"&gt;long&lt;/font&gt; Id property and maintain a single counter for all entities. Of course, you are free to implement this any way that works for you. The Commit() method is a no-op since we don’t plan on persisting the data to disk, but you can implement a Repository that does this if you like.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This implementation works with concrete entity classes (POCOs). I originally had a version that worked with interfaces and the repository mapped the interfaces to an implementation. This worked well with Entity Framework and its generated EntityObject classes, but fell down when I tried to use it with WCF RIA Services.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:eb1a765f-0722-4e31-b9c5-74c26c0595d3" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 717px; height: 556px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Collections;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; Interfaces&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; InMemRepository : BaseRepository&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; InMemRepository()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; could data load from disk here&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        }&lt;br /&gt;&lt;br /&gt;        Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type, ArrayList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; roots &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type, ArrayList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;long&lt;/span&gt;&lt;span style="color: #000000;"&gt; counter &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; DateTime.Now.Ticks;&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; ArrayList GetRootList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;        {&lt;br /&gt;            ArrayList list;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (&lt;/span&gt;&lt;span style="color: #000000;"&gt;!&lt;/span&gt;&lt;span style="color: #000000;"&gt;roots.TryGetValue(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T), &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;out&lt;/span&gt;&lt;span style="color: #000000;"&gt; list))&lt;br /&gt;            {&lt;br /&gt;                list &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; ArrayList();&lt;br /&gt;                roots[&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T)] &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; list;&lt;br /&gt;            }&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; list;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; IQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;        {&lt;br /&gt;            var list &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; GetRootList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; list.Cast&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().AsQueryable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; T New&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; Activator.CreateInstance&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; assumes that there is an Id property (long)&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; SetNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            var idProperty &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T).GetProperty(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Id&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;            idProperty.SetValue(obj, counter&lt;/span&gt;&lt;span style="color: #000000;"&gt;++&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Add&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            var list &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; GetRootList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            list.Add(obj);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Remove&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(T obj)&lt;br /&gt;        {&lt;br /&gt;            var list &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; GetRootList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;T&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;            list.Remove(obj);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Commit()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; code here to write to disk&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is a unit test that demonstrates how to work with the repository:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d4c3eda9-6165-4b3e-aa37-2706644bc9d1" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 720px; height: 556px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #000000;"&gt;[TestClass()]&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; InMemRepositoryTest&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; Department&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;long&lt;/span&gt;&lt;span style="color: #000000;"&gt; Id { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Name { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; IList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; _courses &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; List&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; IList&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Courses { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt; { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; _courses; } }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; Course&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;long&lt;/span&gt;&lt;span style="color: #000000;"&gt; Id { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Name { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;private&lt;/span&gt;&lt;span style="color: #000000;"&gt; Department _department;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;virtual&lt;/span&gt;&lt;span style="color: #000000;"&gt; Department Department { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt; { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; _department; }&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (_department &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;) _department.Courses.Remove(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;                _department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; value;&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (_department &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;) _department.Courses.Add(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [TestMethod]&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Test_InMemRepository()&lt;br /&gt;    {&lt;br /&gt;        IRepository repo &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; InMemRepository();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; create some departments&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        var math &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.AddNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;();&lt;br /&gt;        Assert.IsNotNull(math);&lt;br /&gt;        Assert.IsInstanceOfType(math, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(Department));&lt;br /&gt;        Assert.IsTrue(math.Id &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;&lt;br /&gt;        math.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Mathematics&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;        repo.Commit();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; use the convenience method&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        var compsci &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(d &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            d.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Computer Science&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;        });&lt;br /&gt;        Assert.IsNotNull(compsci);&lt;br /&gt;        Assert.IsInstanceOfType(compsci, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(Department));&lt;br /&gt;        Assert.IsTrue(compsci.Id &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;        Assert.IsTrue(compsci.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;==&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Computer Science&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;&lt;br /&gt;        var count &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Department&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().Count();&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(count, &lt;/span&gt;&lt;span style="color: #800080;"&gt;2&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; create some courses&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        var algebra &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(c &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            c.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Algebra&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;            c.Department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; math;               &lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        var trig &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(c &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            c.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Trigonometry&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;            c.Department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; math;&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        var lisp &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; repo.CreateNext&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(c &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        {&lt;br /&gt;            c.Name &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Lisp&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;            c.Department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; math;&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="color: #800080;"&gt;3&lt;/span&gt;&lt;span style="color: #000000;"&gt;, repo.Query&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Course&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;().Count());&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="color: #800080;"&gt;3&lt;/span&gt;&lt;span style="color: #000000;"&gt;, math.Courses.Count());&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, compsci.Courses.Count());&lt;br /&gt;&lt;br /&gt;        lisp.Department &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; compsci;&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="color: #800080;"&gt;2&lt;/span&gt;&lt;span style="color: #000000;"&gt;, math.Courses.Count());&lt;br /&gt;        Assert.AreEqual&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;, compsci.Courses.Count());&lt;br /&gt;    }&lt;br /&gt;}    &lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;My next post will show how to write a Repository implementation for Entity Framework.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-1622949268014282873?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/1622949268014282873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=1622949268014282873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1622949268014282873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1622949268014282873'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/09/repository-like-facade-for-mocking.html' title='A Repository-like façade for mocking Entity Framework'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4844947834747318047</id><published>2010-09-07T13:54:00.001-04:00</published><updated>2010-09-07T13:54:47.120-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>The future of Silverlight</title><content type='html'>&lt;p&gt;Due to rumors swiling about the demise of Silverlight at the hands of HTML 5, Microsoft felt compelled to &lt;a href="http://team.silverlight.net/announcement/the-future-of-silverlight/" target="_blank"&gt;publish the following on the Silverlight Blog&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;In about half the time HTML 5 has been under design, we've created Silverlight and shipped four major versions of it. And it's still unclear exactly when HTML 5 and its related specs will be complete with full test suites. For HTML 5 to be really targetable, the spec has to stabilize, browsers have to all implement the specs in the same way, and over a billion people have to install a new browser or buy a new device or machine. That's going to take a while. And by the time HTML 5 is broadly targetable, Silverlight will have evolved significantly. Meanwhile, Silverlight is here now and works in all popular browsers and OS's.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;&lt;b&gt;…Silverlight is much more than a browser technology&lt;/b&gt;. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;There are three areas of investment for Silverlight outside the browser: the desktop, the mobile device, and the living room. Powerful desktop applications can be created with Silverlight today. These applications don't require a separate download—any desktop user with Silverlight installed has these capabilities. These apps can be discovered and downloaded in the browser but are standalone applications that are painless to install and delete. Silverlight now also runs on mobile devices and is the main development platform for the new Windows Phone 7 devices. Developers that learned Silverlight instantly &lt;/font&gt;&lt;a href="http://team.silverlight.net/product-technology-deep-dive/an-integrator-rsquo-s-take-on-developing-for-windows-phone-7-series/"&gt;&lt;font color="#0000ff"&gt;became mobile developers&lt;/font&gt;&lt;/a&gt;&lt;font color="#0000ff"&gt;. Lastly, at NAB and the Silverlight 4 launch this year &lt;/font&gt;&lt;a href="http://team.silverlight.net/announcement/microsoft-silverlight-recap-at-nab-2010/"&gt;&lt;font color="#0000ff"&gt;we showed how Silverlight can be used as a powerful, rich platform for living room devices&lt;/font&gt;&lt;/a&gt;&lt;font color="#0000ff"&gt; as well.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://team.silverlight.net/announcement/the-future-of-silverlight/" target="_blank"&gt;Read the whole thing.&lt;/a&gt; It’s long but worth the time.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4844947834747318047?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4844947834747318047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4844947834747318047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4844947834747318047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4844947834747318047'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/09/future-of-silverlight.html' title='The future of Silverlight'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4064588291224172428</id><published>2010-09-07T13:41:00.001-04:00</published><updated>2010-09-07T13:41:53.385-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 4 – September 2010 refresh</title><content type='html'>&lt;p&gt;Microsoft has released a refresh for Silverlight 4 to fix some bugs. Read &lt;a href="http://timheuer.com/blog/archive/2010/09/01/silverlight-service-release-september-2010-gdr1.aspx" target="_blank"&gt;Tim Heuer’s blog post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you are developing in LightSwitch, then you will need the new Developer Runtime and SDK.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=188039"&gt;Windows &lt;strong&gt;developer&lt;/strong&gt; runtime&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=188040"&gt;Mac &lt;strong&gt;developer&lt;/strong&gt; runtime&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=188043"&gt;Silverlight 4.0.50826.0 SDK&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139&amp;amp;displaylang=en" target="_blank"&gt;Silverlight Tools package&lt;/a&gt; has also been updated with the new SDK and runtime.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4064588291224172428?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4064588291224172428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4064588291224172428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4064588291224172428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4064588291224172428'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/09/silverlight-4-september-2010-refresh.html' title='Silverlight 4 – September 2010 refresh'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8583193785359614636</id><published>2010-09-02T17:12:00.001-04:00</published><updated>2010-09-02T17:12:13.780-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><title type='text'>Windows Phone 7 RTM today</title><content type='html'>&lt;p&gt;According to a &lt;a href="http://twitter.com/scottgu" target="_blank"&gt;tweet from Scott Guthrie&lt;/a&gt;, &lt;a href="http://www.i4u.com/38748/windows-phone-7-rtm-version-locked-down" target="_blank"&gt;Windows Phone 7 is released to manufacturing&lt;/a&gt; today. The final tools will be ready for download in two weeks, on September 16.&lt;/p&gt;  &lt;p&gt;VS 2010 Express for Windows Phone 7 and Expression Blend for Phone 7 will be free.&lt;/p&gt;  &lt;p&gt;Take a look at the &lt;a href="http://channel9.msdn.com/posts/egibson/Windows-Phone-7-Jump-Start-Session-1-of-12-Introduction/" target="_blank"&gt;Windows 7 Jump Start&lt;/a&gt; on-line training while you’re waiting.&lt;/p&gt;  &lt;p&gt;Labs and code can be found in the &lt;a href="http://channel9.msdn.com/learn/courses/WP7TrainingKit/" target="_blank"&gt;Training Kit&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8583193785359614636?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8583193785359614636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8583193785359614636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8583193785359614636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8583193785359614636'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/09/windows-phone-7-rtm-today.html' title='Windows Phone 7 RTM today'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-705050343138307286</id><published>2010-08-31T11:31:00.001-04:00</published><updated>2010-08-31T14:09:31.292-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='LightSwitch'/><title type='text'>More LightSwitch commentary</title><content type='html'>&lt;p&gt;&lt;a href="http://www.itwriting.com/blog/" target="_blank"&gt;Tim Anderson&lt;/a&gt; has two informative posts about Microsoft’s &lt;a href="http://www.microsoft.com/visualstudio/en-us/lightswitch" target="_blank"&gt;LightSwitch&lt;/a&gt;. I’ll try to summarize them here.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.itwriting.com/blog/3036-ten-things-you-need-to-know-about-microsofts-visual-studio-lightswitch.html" target="_blank"&gt;Ten things you need to know about LightSwitch&lt;/a&gt; (Tim Anderson):&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;LightSwitch builds Silverlight apps for Windows, and to a lesser extent, Mac. &lt;/li&gt;    &lt;li&gt;There is no visual forms designer. &lt;/li&gt;    &lt;li&gt;However, you can customize your form while running in the debugger. &lt;/li&gt;    &lt;li&gt;LightSwitch lets you build a model of your application behind the scenes. &lt;/li&gt;    &lt;li&gt;It has built-in business data-types like E-mail Address and Phone Number. &lt;/li&gt;    &lt;li&gt;LightSwitch tries to make it easier for non-developers to understand relational database design. &lt;/li&gt;    &lt;li&gt;To that end, it uses LINQ and not SQL. &lt;/li&gt;    &lt;li&gt;LightSwitch will be cheaper than VS Professional when it releases. &lt;/li&gt;    &lt;li&gt;LightSwitch applications are cloud-ready, as long as you want to use Windows Azure. &lt;/li&gt;    &lt;li&gt;Tim speculates that Windows Phone 7 will be added as a target platform. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://www.itwriting.com/blog/3038-visual-studio-lightswitch-model-driven-architecture-for-the-mainstream.html" target="_blank"&gt;Visual Studio LightSwitch – model-driven architecture for the mainstream&lt;/a&gt; (Tim Anderson):&lt;/p&gt;  &lt;p&gt;Tim spoke to two LightSwitch team members. They couldn’t speculate on a release date, but did say that Windows Phone 7 will not be targeted in the first release. Perhaps it will be added later. The product was designed to allow different output formats for applications, but Mac is not considered high-priority. The development of LightSwitch had an influence on the design of some WCF RIA Services features. &lt;/p&gt;  &lt;p&gt;While Microsoft seems to be positioning LightSwitch as a tool for the masses to develop departmental applications, it remains to be seen if it will catch on. Perhaps on a larger scale, Microsoft intends to deliver on the promise of model-driven application generation. And that would be no small feat.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-705050343138307286?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/705050343138307286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=705050343138307286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/705050343138307286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/705050343138307286'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/08/more-lightswitch-commentary.html' title='More LightSwitch commentary'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5690486411345452695</id><published>2010-08-28T22:32:00.001-04:00</published><updated>2010-08-28T22:32:36.115-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='LightSwitch'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Visual Studio LightSwitch Beta1</title><content type='html'>&lt;p&gt;Microsoft has released the first beta of its &lt;a href="http://www.microsoft.com/visualstudio/en-us/lightswitch" target="_blank"&gt;LightSwitch product&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;LightSwitch allows you to create web-based data-driven applications, using industry-standard patterns and technologies: Entity Framework, WCF RIA Services and Silverlight.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_dYh5X98iMTc/THnGwUvrMeI/AAAAAAAAAHg/IqwE26GonXU/s1600-h/7167.RunningApp1WithAnnotations_5F00_thumb_5F00_6A221694%5B6%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="7167.RunningApp1WithAnnotations_5F00_thumb_5F00_6A221694" border="0" alt="7167.RunningApp1WithAnnotations_5F00_thumb_5F00_6A221694" src="http://lh4.ggpht.com/_dYh5X98iMTc/THnGw3_7gvI/AAAAAAAAAHk/Z_dNmSsUrho/7167.RunningApp1WithAnnotations_5F00_thumb_5F00_6A221694_thumb%5B1%5D.png?imgmax=800" width="688" height="492" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;More LightSwitch links:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/default.aspx" target="_blank"&gt;The LightSwitch Developer Center&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ac1d8eb5-ac8e-45d5-b1e3-efb8e4e3ebd1&amp;amp;displaylang=en" target="_blank"&gt;LightSwitch Training Kit&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;The LightSwitch Blog&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5690486411345452695?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5690486411345452695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5690486411345452695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5690486411345452695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5690486411345452695'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2010/08/visual-studio-lightswitch-beta1.html' title='Visual Studio LightSwitch Beta1'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_dYh5X98iMTc/THnGw3_7gvI/AAAAAAAAAHk/Z_dNmSsUrho/s72-c/7167.RunningApp1WithAnnotations_5F00_thumb_5F00_6A221694_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8287699584385345039</id><published>2009-11-18T17:48:00.001-05:00</published><updated>2009-11-18T17:48:18.812-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><title type='text'>WCF RIA Services</title><content type='html'>&lt;p&gt;What is WCF RIA Services? Well it is .NET RIA Service renamed, to more accurately represent the communications framework that is being used.&lt;/p&gt;  &lt;p&gt;See: &lt;a href="http://forums.silverlight.net/forums/t/144513.aspx" target="_blank"&gt;WCF RIA Services aka .NET RIA Services now available&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The MSDN Doc page: &lt;a title="http://msdn.microsoft.com/en-us/library/ee707344(VS.91).aspx" href="http://msdn.microsoft.com/en-us/library/ee707344(VS.91).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee707344(VS.91).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Get Started with WCF RIA Services: &lt;a title="http://silverlight.net/getstarted/riaservices/" href="http://silverlight.net/getstarted/riaservices/"&gt;http://silverlight.net/getstarted/riaservices/&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8287699584385345039?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8287699584385345039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8287699584385345039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8287699584385345039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8287699584385345039'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/11/wcf-ria-services.html' title='WCF RIA Services'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-332507866647548977</id><published>2009-11-18T17:39:00.001-05:00</published><updated>2009-11-18T17:47:19.236-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 4 Beta Available</title><content type='html'>&lt;p&gt;Get the news here: &lt;a href="http://silverlight.net/getstarted/silverlight-4-beta/"&gt;Silverlight 4 Beta : The Official Microsoft Silverlight Site&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Silverlight 4 development will require Visual Studio 2010.&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 can be installed side-by-side with Visual Studio 2008 SP1. Please &lt;a href="http://blogs.msdn.com/amyd/archive/2009/10/21/visual-studio-2010-and-silverlight-3-sdk.aspx"&gt;read the known issue on installing Visual Studio 2010 if you already have the Silverlight 3 SDK installed&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Silverlight 4 on MDSN: &lt;a title="http://msdn.microsoft.com/en-us/library/cc838158(VS.96).aspx" href="http://msdn.microsoft.com/en-us/library/cc838158(VS.96).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc838158(VS.96).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What’s New (partial listing)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Printing (finally): Silverlight 4 adds printing support that allows developers to control whether their Silverlight application can print itself, how the content is formatted when printed, and determine the content that will appear. For example, you could add a print button to your Silverlight application that opens the Print dialog allows the user to choose the printer, and then prints the Silverlight content.&lt;/p&gt;  &lt;p&gt;&lt;a name="_Toc245894079"&gt;Implicit Styles&lt;/a&gt;: Silverlight 4 introduces new styling features that allow you to create a style as a resource that can be used implicitly by all elements of a target type. This allows application developers to customize the look across multiple instances of a control and modify the appearance of these control instances by changing the implicit style.&lt;/p&gt;  &lt;p&gt;&lt;a name="_Toc245894081"&gt;Right Mouse Click&lt;/a&gt;: Silverlight 4 adds the ability to right click a visual element to perform custom actions such as displaying a menu that provides contextual commands or invoking commands for a Silverlight game.&lt;/p&gt;  &lt;p&gt;&lt;a name="_Toc245894082"&gt;Programmatic Clipboard Access&lt;/a&gt;: Silverlight 4 adds the ability to programmatically access the clipboard to format and modify data during copy, cut, and paste operations. To copy data from a Silverlight application to the clipboard use the Clipboard.SetText method&lt;/p&gt;  &lt;p&gt;Silverlight as a Drop Target: Silverlight 4 now supports being a drop-target for the common drag-and-drop practice of clicking on a virtual object and dragging it to a different location or onto another virtual object. Both Windows and Mac platforms support this feature. Silverlight only supports dragging of file(s) from local client and dropping them onto a Silverlight application. It does not support dragging of folders (directories). &lt;/p&gt;  &lt;p&gt;&lt;a name="_Toc245894076"&gt;ObservableCollection&amp;lt;T&amp;gt; &lt;/a&gt;Constructor Accepts IList and IEnumerable (yay!): Silverlight 4 also can take advantage of new constructor overloads that allow it to initialize an ObservableCollection&amp;lt;T&amp;gt; from an IEnumerable or IList.&lt;/p&gt;  &lt;p&gt;More can be found on Tim Heuer’s blog: &lt;a title="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+timheuer%2Friaservices+%28Tim+Heuer+-+.NET+RIA+Services%29" href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx"&gt;http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-332507866647548977?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/332507866647548977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=332507866647548977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/332507866647548977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/332507866647548977'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/11/silverlight-4-beta-available.html' title='Silverlight 4 Beta Available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5378253456079607944</id><published>2009-11-11T14:56:00.001-05:00</published><updated>2009-11-11T14:56:54.345-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>RIA Services : The Official Microsoft Silverlight Site</title><content type='html'>&lt;p&gt;Brad Abrams announced last week that Microsoft has launched an official community site for RIA Services.&lt;/p&gt;  &lt;p&gt;You will see that the latest version available of RIA Services is still the July 2009 CTP. &lt;/p&gt;  &lt;p&gt;I expect to see a new release next week at PDC.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/riaservices/"&gt;RIA Services : The Official Microsoft Silverlight Site&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5378253456079607944?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5378253456079607944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5378253456079607944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5378253456079607944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5378253456079607944'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/11/ria-services-official-microsoft.html' title='RIA Services : The Official Microsoft Silverlight Site'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8991035304571892567</id><published>2009-07-09T15:57:00.001-04:00</published><updated>2009-07-09T15:57:34.273-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Expression Blend'/><title type='text'>Silverlight 3 released and available for download.</title><content type='html'>&lt;p&gt;See Mary Jo Foley's piece &lt;a href="http://blogs.zdnet.com/microsoft/?p=3289" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Also, tomorrow is the launch for SL3 and Expression 3. It starts at 10 AM PDT I am told - that's 1 PM on the East Coast.&lt;/p&gt;  &lt;p&gt;Go to &lt;a href="http://www.seethelight.com"&gt;www.seethelight.com&lt;/a&gt; tomorrow to enjoy all the silvery goodness.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8991035304571892567?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8991035304571892567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8991035304571892567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8991035304571892567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8991035304571892567'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/07/silverlight-3-released-and-available.html' title='Silverlight 3 released and available for download.'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-2588897610898343451</id><published>2009-06-24T22:39:00.001-04:00</published><updated>2009-06-24T22:39:25.986-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><title type='text'>Entity Framework CTP 1</title><content type='html'>&lt;p&gt;The ADO.NET team at Microsoft has released an update to EF since the Beta release of VS2010/Net4.&lt;/p&gt;  &lt;p&gt;They are calling it &lt;a href="http://blogs.msdn.com/adonet/archive/2009/06/22/announcing-entity-framework-feature-ctp-1.aspx" target="_blank"&gt;Entity Framework Feature CTP 1&lt;/a&gt;. Some of these features are not scheduled to be in .NET 4 when it releases, so if you want them, download the CTP and give them &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/adonetefx/threads" target="_blank"&gt;feedback&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-2588897610898343451?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/2588897610898343451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=2588897610898343451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588897610898343451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588897610898343451'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/06/entity-framework-ctp-1.html' title='Entity Framework CTP 1'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5638049202595423499</id><published>2009-06-24T15:14:00.001-04:00</published><updated>2009-06-24T15:14:01.801-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><title type='text'>Microsoft OracleClient Deprecated in .NET 4.0</title><content type='html'>&lt;p&gt;From &lt;a href="http://www.infoq.com/news/2009/06/oracleclient_deprecated"&gt;InfoQ&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Microsoft announced &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.oracleclient.aspx"&gt;System.Data.OracleClient&lt;/a&gt; &lt;a href="http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx"&gt;will be deprecated after .NET 4.0&lt;/a&gt;. Classes in the namespace will be marked obsolete in .NET 4.0 and removed from future releases. OracleClient is the ADO.NET provider for Oracle developed by Microsoft and shipped as part of the .NET Framework Class Library.&lt;/p&gt;    &lt;p&gt;Part of the reasoning for this decision is the increasingly availability and improvements of 3rd party ADO.NET data providers for Oracle. There have been significant performance improvements and enhanced multi-version compatibility among the popular Oracle providers:&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://www.oracle.com/technology/tech/windows/odpnet/index.html"&gt;Oracle's free Oracle Data Provider for .NET (ODP.NET)&lt;/a&gt; ODP.NET 11g is compatbile with all versions of Oracle Database back to 9.2, and multiple versions can coexist in a single OS &lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.datadirect.com/products/net/net_for_oracle/index.ssp"&gt;DataDirect ADO.NET Data Provider for Oracle&lt;/a&gt; 100% managed code, free trial &lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.devart.com/dotconnect/oracle/"&gt;Devart dotConnect for Oracle&lt;/a&gt; Formerly known of as OraDirect.NET, free trial, supports Entity Framework, LINQ to Oracle, and ASP.NET Provider Model &lt;/li&gt;   &lt;/ul&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5638049202595423499?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5638049202595423499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5638049202595423499' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5638049202595423499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5638049202595423499'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/06/microsoft-oracleclient-deprecated-in.html' title='Microsoft OracleClient Deprecated in .NET 4.0'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3579110025232835041</id><published>2009-06-13T10:56:00.001-04:00</published><updated>2009-06-13T10:56:31.397-04:00</updated><title type='text'>Caliburn v1 Release Candidate available</title><content type='html'>&lt;p&gt;Rob Eisenberg has a &lt;a href="http://devlicio.us/blogs/rob_eisenberg/archive/2009/06/13/caliburn-v1-release-candidate.aspx" target="_blank"&gt;blog post&lt;/a&gt; in which he details the important changes since the beta release of Caliburn.&lt;/p&gt;  &lt;p&gt;What is &lt;a href="http://caliburn.codeplex.com/" target="_blank"&gt;Caliburn&lt;/a&gt;? &lt;/p&gt;  &lt;p&gt;Caliburn is a toolkit to help you build Silverlight and WPF applications that are compliant with a number of UI design patterns (&lt;a href="http://devlicio.us/blogs/rob_eisenberg/archive/2009/05/18/mvvm-and-the-origins-of-caliburn.aspx" target="_blank"&gt;MVVM and Command Pattern&lt;/a&gt; being the relevant ones for me).&lt;/p&gt;  &lt;p&gt;I’ve been working with &lt;a href="http://compositewpf.codeplex.com/" target="_blank"&gt;Prism&lt;/a&gt; for a few weeks and now I have to figure out how to get Prism and Caliburn to play nice together.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3579110025232835041?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3579110025232835041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3579110025232835041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3579110025232835041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3579110025232835041'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/06/caliburn-v1-release-candidate-available.html' title='Caliburn v1 Release Candidate available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3675078115870451151</id><published>2009-06-09T10:00:00.002-04:00</published><updated>2009-06-09T11:45:32.495-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>.NET RIA Services V1 Roadmap</title><content type='html'>&lt;p&gt;&lt;a href="http://silverlight.net/members/Dinesh-Kulkarni.aspx" target="_blank"&gt;Dinesh Kulkarni&lt;/a&gt;, from the RIA Services team, has published a &lt;a href="http://silverlight.net/forums/t/101160.aspx" target="_blank"&gt;roadmap for RIA Services&lt;/a&gt;. No guarantees here, but they hope to release a beta at &lt;a href="https://www.ustechsregister.com/pdc09mailinglist/main.aspx" target="_blank"&gt;PDC in November&lt;/a&gt;. The next CTP will be in July.&lt;/p&gt;  &lt;p&gt;It's a bit disappointing to me. I had heard a rumor that RIA would release with Silverlight 3 in July. Perhaps it referred to the CTP. According to the roadmap, they are making changes to the underlying protocol (moving to ADO.NET Data Services), so you know that will take a lot of time.&lt;/p&gt;  &lt;p&gt;Highlights from his post:&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f06%2fnet-ria-services-v1-roadmap.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f06%2fnet-ria-services-v1-roadmap.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt; &lt;blockquote&gt;   &lt;table cellspacing="0" cellpadding="2" width="642" border="1"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="640"&gt;           &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;July 2009 CTP&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;ul&gt;             &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;This is a preview, &lt;u&gt;not&lt;/u&gt; the V1 release. We plan to drop go-live restriction from EULA – still use it at your own risk.&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Try to get significant known breaking changes (the ones we don’t know about will come later)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Feature enhancements (e.g. code-gen hookpoints to add your custom code, improved library support, better shared code support, query for singletons, cleaner user model and better extensibility support for Application Services etc.)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Usual fare of bug fixes, API improvements etc&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Enable a first set of better together experiences with  ADO.NET Data Services (add a DomainService to Data Service for writing app logic / expose DomainService as DataService)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;           &lt;/ul&gt;            &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;PDC 2009 Beta&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;ul&gt;             &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Additional core feature work (list TBD, under consideration – hierarchy support, presentation model)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Work on Visual Studio 2010 / .NET 4 support&lt;/span&gt;&lt;/p&gt;                &lt;ul&gt;                 &lt;li&gt;                   &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Drag-drop support for databinding&lt;/span&gt;&lt;/p&gt;                 &lt;/li&gt;                  &lt;li&gt;                   &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Run in medium trust&lt;/span&gt;&lt;/p&gt;                 &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Move to ADO.NET Data Services as the underlying protocol&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;           &lt;/ul&gt;            &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;First part of 2010: RTW&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;ul&gt;             &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Polish beta release (bugs, perf, stress, security, localization, …)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Small design changes / tweaks&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;Keep up with changes in other products&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;           &lt;/ul&gt;            &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;A note on Platforms and tools&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;ul&gt;             &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;In each CTP, we will be keeping up with corresponding public Silverlight drops as and when they are scheduled (sorry, I don’t have that schedule)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;              &lt;li&gt;               &lt;p&gt;&lt;span style="font-family:Arial;color:#400080;"&gt;For RTW, we are planning Visual Studio 2010 / .NET 4  as the primary story. Support for previous version TBD (depends on feedback about relative importance / cost / options)&lt;/span&gt;&lt;/p&gt;             &lt;/li&gt;           &lt;/ul&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3675078115870451151?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3675078115870451151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3675078115870451151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3675078115870451151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3675078115870451151'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/06/net-ria-services-v1-roadmap.html' title='.NET RIA Services V1 Roadmap'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7661782434824926475</id><published>2009-05-30T10:34:00.001-04:00</published><updated>2009-05-30T10:55:50.246-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prism'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Resources for Developing Silverlight/Prism Applications</title><content type='html'>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://development-guides.silverbaylabs.org/Video/Silverlight-Prism" target="_blank"&gt;Prism for Silverlight - An Intro to Composite Applications (Video)&lt;/a&gt;       &lt;br /&gt;by Erik Mork       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://development-guides.silverbaylabs.org/Video/Modularity-in-Prism" target="_blank"&gt;Modularity - Testing, Module Catalog and Unity in Prism&lt;/a&gt;      &lt;br /&gt;by Erik Mork      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/dphill/archive/2009/05/29/prism-quick-start-kit.aspx" target="_blank"&gt;Prism Quick Start Kit&lt;/a&gt;       &lt;br /&gt;by David Hill       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/bobbrum/archive/2009/02/27/building-a-prism-application-the-complete-series.aspx" target="_blank"&gt;Building a Prism Application (4 short videos)&lt;/a&gt;       &lt;br /&gt;by Bob Brumfield and Erwin van der Valk       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.silverlightshow.net/items/Patterns-and-practices-in-the-Composite-Application-Library-part-1.aspx" target="_blank"&gt;Patterns and practices in the Composite Application Library&lt;/a&gt;       &lt;br /&gt;by Pencho Popadiyn       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.silverlightshow.net/items/Model-View-ViewModel-in-Silverlight.aspx" target="_blank"&gt;Model &amp;#8211; View &amp;#8211; ViewModel in Silverlight&lt;/a&gt;       &lt;br /&gt;by Pencho Popadiyn       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.ideablade.com/DevforceSilverlight/Videos/TechEd_PrismExplorer/TechEd_BuildingModularApps_PrismExplorer.html" target="_blank"&gt;Developing Modular Applications Using Microsoft Silverlight and WPF (TechEd Video)&lt;/a&gt;       &lt;br /&gt;by Ward Bell       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.rollthunder.com/Prism/PrismPublicClass.htm" target="_blank"&gt;Programming Prism (Public online class)&lt;/a&gt;       &lt;br /&gt;by David Platt &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fresources-for-developing.html"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fresources-for-developing.html" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7661782434824926475?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7661782434824926475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7661782434824926475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7661782434824926475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7661782434824926475'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/resources-for-developing.html' title='Resources for Developing Silverlight/Prism Applications'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-847796305948160336</id><published>2009-05-29T10:39:00.001-04:00</published><updated>2009-05-29T10:39:27.486-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Expression Blend'/><title type='text'>Silverlight 3 and Expression Studio 3 to launch July 10, 2009</title><content type='html'>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://news.softpedia.com/news/Silverlight-3-Drops-July-10-2009-112903.shtml"&gt;http://news.softpedia.com/news/Silverlight-3-Drops-July-10-2009-112903.shtml&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.zdnet.com/microsoft/?p=2912"&gt;http://blogs.zdnet.com/microsoft/?p=2912&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.neowin.net/news/main/09/05/29/microsoft-confirms-silverlight-3-to-launch-on-july-10"&gt;http://www.neowin.net/news/main/09/05/29/microsoft-confirms-silverlight-3-to-launch-on-july-10&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-847796305948160336?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/847796305948160336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=847796305948160336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/847796305948160336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/847796305948160336'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/silverlight-3-and-expression-studio-3.html' title='Silverlight 3 and Expression Studio 3 to launch July 10, 2009'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-9099623573256037760</id><published>2009-05-22T16:09:00.001-04:00</published><updated>2009-05-22T16:09:01.146-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Will Visual Studio 2010 put Expression Blend out of business?</title><content type='html'>&lt;p&gt;Not according to &lt;a href="http://silverlight.net/blogs/jesseliberty/archive/2009/05/22/i-m-committed-to-two-tool-development.aspx" target="_blank"&gt;Jesse Liberty&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;You will want Blend 3 for its terrific designer and animation capabilities and VS for its development capabilities. Microsoft is trying to make these tools the best for their target audience, rather than one tool that does everything merely adequately.&lt;/p&gt;  &lt;p&gt;The other point Jesse makes: Because it is a few months old at this point, the Blend 3 beta won't work with .NET 4 projects yet. If you want to work on projects in VS 2010 and Blend 3, create them as .NET 3.5 projects.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-9099623573256037760?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/9099623573256037760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=9099623573256037760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9099623573256037760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9099623573256037760'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/will-visual-studio-2010-put-expression.html' title='Will Visual Studio 2010 put Expression Blend out of business?'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8562645491750971341</id><published>2009-05-22T13:47:00.001-04:00</published><updated>2009-05-22T14:06:23.547-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Good news and bad news for Silverlight 3 development</title><content type='html'>&lt;p&gt;According to &lt;a href="http://timheuer.com/blog/archive/2009/05/20/silverlight-and-visual-studio-2010-beta.aspx" target="_blank"&gt;this post by Tim Heuer&lt;/a&gt;, the good news is that you can install the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8D933343-038F-499C-986C-C3C7E87A60B3&amp;amp;displaylang=en" target="_blank"&gt;Silverlight 2&lt;/a&gt; and &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=d09b6ecf-9a45-4d99-b752-2a330a937bc4" target="_blank"&gt;3 SDKs&lt;/a&gt; with Visual Studio 2010 Beta 1. You will get multi-targeted Silverlight development (i.e., either Silverlight 2 or 3) and an editable design surface.&lt;/p&gt;  &lt;p&gt;Do not install the Silverlight 2 or 3 Tools packages, it won't work on VS 2010. And the Silverlight Navigation App template is not included with the SDK, only with the tools package.&lt;/p&gt;  &lt;p&gt;You also need to install the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=143433" target="_blank"&gt;Silverlight 3 Beta Developer runtime&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The bad news: .NET RIA Services will not install on VS 2010 Beta 1.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8562645491750971341?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8562645491750971341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8562645491750971341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8562645491750971341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8562645491750971341'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/good-news-and-bad-news-for-silverlight.html' title='Good news and bad news for Silverlight 3 development'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-9012469964676957330</id><published>2009-05-20T13:56:00.002-04:00</published><updated>2009-05-21T17:22:12.281-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><title type='text'>VS 2010 / .NET 4 Beta 1 now generally available</title><content type='html'>&lt;p&gt;Look here: &lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can find documentation here: &lt;a href="http://msdn.microsoft.com/en-us/library/bb386063(VS.100).aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/bb386063(VS.100).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next release of ADO.NET Entity Framework (EF) will be numbered 4.0 to sync to the .NET version and &lt;a href="http://blogs.msdn.com/adonet/archive/2009/05/20/entity-framework-4-0-beta-1-bits-now-available-in-the-vs-2010-and-net-4-beta-1.aspx" target="_blank"&gt;will be part of .NET 4.0&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can see some screenshots here: &lt;a href="http://blogs.lessthandot.com/index.php/DesktopDev/MSTech/visual-studio-2010-screenshots" target="_blank"&gt;http://blogs.lessthandot.com/index.php/DesktopDev/MSTech/visual-studio-2010-screenshots&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-9012469964676957330?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/9012469964676957330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=9012469964676957330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9012469964676957330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9012469964676957330'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/vs-2010-net-4-beta-1-now-generally.html' title='VS 2010 / .NET 4 Beta 1 now generally available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6679349852264603620</id><published>2009-05-18T18:15:00.001-04:00</published><updated>2009-05-18T18:15:58.876-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><title type='text'>Visual Studio 2010 (.NET 4.0) Beta 1 released</title><content type='html'>&lt;p&gt;The first Beta release of VS 2010 is available starting today for MSDN subscribers.&lt;/p&gt;  &lt;p&gt;There is a great write-up on Jason Zander's blog -   &lt;br /&gt;&lt;a title="http://blogs.msdn.com/jasonz/archive/2009/05/18/announcing-vs2010-net-framework-4-0-beta-1.aspx" href="http://blogs.msdn.com/jasonz/archive/2009/05/18/announcing-vs2010-net-framework-4-0-beta-1.aspx"&gt;http://blogs.msdn.com/jasonz/archive/2009/05/18/announcing-vs2010-net-framework-4-0-beta-1.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Highlights:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;New templates and tools can be downloaded from VS Gallery within Visual Studio. &lt;/li&gt;    &lt;li&gt;Support for TDD &lt;/li&gt;    &lt;li&gt;&lt;font face="Courier New" color="#0000ff"&gt;dynamic&lt;/font&gt; keyword for Office programmability &lt;/li&gt;    &lt;li&gt;many VB language improvements (I won't go into them 'cuz I'm a C# guy) &lt;/li&gt;    &lt;li&gt;many improvements to C++ support (again, not my bag) &lt;/li&gt;    &lt;li&gt;F# included with VS 2010 &lt;/li&gt;    &lt;li&gt;improvements to the WPF editor &lt;/li&gt;    &lt;li&gt;Silverlight editor now built-in &lt;/li&gt;    &lt;li&gt;HTML snippets for ASP.NET coding &lt;/li&gt;    &lt;li&gt;JavaScript IntelliSense improvements &lt;/li&gt;    &lt;li&gt;JQuery included &lt;/li&gt;    &lt;li&gt;Team Arch does standard UML now. I'm not big into UML, but I find Sequence Diagrams pretty useful. &lt;/li&gt;    &lt;li&gt;Architectural Explorer lets you browse through your Namespaces and view the structure of your app; then generate Sequence Diagrams automatically. Looks cool. &lt;/li&gt;    &lt;li&gt;Test Plan management improvements (&amp;quot;Camano&amp;quot;, now called Microsoft Test and Lab Manager, will be available as a scaled-down VS edition)&lt;/li&gt;    &lt;li&gt;TFS improvements: branch management, visualizations, drag-drop merging. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Wow. I am looking forward to a test-drive.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6679349852264603620?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6679349852264603620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6679349852264603620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6679349852264603620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6679349852264603620'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/visual-studio-2010-net-40-beta-1.html' title='Visual Studio 2010 (.NET 4.0) Beta 1 released'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8057643212646970190</id><published>2009-05-18T11:13:00.001-04:00</published><updated>2009-05-18T11:13:30.346-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>.NET RIA Services minor bug fix release - May 2009 Preview</title><content type='html'>&lt;p&gt;See the announcement on Brad Abrams blog - &lt;a href="http://blogs.msdn.com/brada/archive/2009/05/11/net-ria-services-may-2009-preview.aspx"&gt;http://blogs.msdn.com/brada/archive/2009/05/11/net-ria-services-may-2009-preview.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Brad states that the Go Live for .NET RIA Services will be right around the time that Silverlight 3 releases.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8057643212646970190?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8057643212646970190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8057643212646970190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8057643212646970190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8057643212646970190'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/net-ria-services-minor-bug-fix-release.html' title='.NET RIA Services minor bug fix release - May 2009 Preview'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6860124018825699030</id><published>2009-05-07T10:05:00.001-04:00</published><updated>2009-05-07T10:44:12.343-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>Authorization Strategies for the Business Layer</title><content type='html'>&lt;p&gt;It's tempting to design a Business Layer that accepts User identity information and attempts to authenticate and authorize the user. However, security is a cross-cutting concern, and as such, should not be intertwined with your business logic.&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fauthorization-strategies-for-business.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fauthorization-strategies-for-business.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt; &lt;p&gt;The strategies presented here will extract the authorization component from the business logic and embed it as a separate concern within the Business Layer. I'm going to ignore the authentication function, and focus on determining what authority an authenticated user has to call functions in the Business Layer.&lt;/p&gt;  &lt;h4&gt;Two-step Business Layer Factory&lt;/h4&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;try&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt; &lt;span style="color: blue"&gt;using&lt;/span&gt;(IFactory factory = &lt;span style="color: #2b91af"&gt;AuthenticatedFactory&lt;/span&gt;.New(user, pw))&lt;br /&gt; {&lt;br /&gt;   IOrderProcessing processing = factory.CreateOrderProcessing();&lt;br /&gt;   &lt;span style="color: blue"&gt;return &lt;/span&gt;processing;&lt;br /&gt;   &lt;span style="color: green"&gt;// or &lt;br /&gt;   // container.RegisterInstance&amp;lt;IOrderProcessing&amp;gt;(processing);&lt;br /&gt; &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: blue"&gt;catch &lt;/span&gt;(AuthenticationError e) { }&lt;br /&gt;&lt;span style="color: blue"&gt;catch &lt;/span&gt;(AuthorizationError e) { }&lt;br /&gt;&lt;span style="color: blue"&gt;finally&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style="color: green"&gt;// clean up&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The authentication is done in the AuthenticationFactory. If the AuthenticationFactory has dependencies on a data layer or LDAP provider, you can trade in the static New method approach for a dependency injection approach:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AuthenticatedFactory &lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style="color: blue"&gt;public &lt;/span&gt;AuthenticatedFactory(IDataLayer dataLayer)&lt;br /&gt;  {&lt;br /&gt;    DataLayer = dataLayer;&lt;br /&gt;  }&lt;br /&gt;  &lt;span style="color: green"&gt;// more code&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Get your factory this way:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(IFactory factory = container.Resolve&amp;lt;AuthenticatedFactory&amp;gt;())&lt;br /&gt;{&lt;br /&gt;  factory.User = user;&lt;br /&gt;  factory.Password = pw;&lt;br /&gt;  &lt;span style="color: green"&gt;// get the business layer&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Fine-grained Authorization using Sub-classes&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One strategy for the Business Layer is to have coarse-grained authorization to the BusinessLayer. The user is either allowed to access that particular Business Layer, or an AuthorizationError is thrown. To make the access more fine-grained, the IOrderProcessing class that is returned can be tailored to the privileges that the authenticated user has. In either case, the factory method CreateOrderProcessing with determine the access level for the user.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;For example suppose the IOrderProcessing interface offers three methods: LookupOrder(), EnterOrder() and ApproveOrder(). There are three levels of access: managers can access all three, clerks can access the first two, and salespeople can only access LookupOrder(). This can be accommodated by four classes and the factory determines which to return to the application.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NoAccessOrderProcessing &lt;/span&gt;: IOrderProcessing&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public virtual &lt;/span&gt;Order LookupOrder() { &lt;span style="color: blue"&gt;throw new &lt;/span&gt;AuthenticationError(); }&lt;br /&gt;    &lt;span style="color: blue"&gt;public virtual void &lt;/span&gt;EnterOrder(Order o) { &lt;span style="color: blue"&gt;throw new &lt;/span&gt;AuthenticationError(); }&lt;br /&gt;    &lt;span style="color: blue"&gt;public virtual void &lt;/span&gt;ApproveOrder(Order o) { &lt;span style="color: blue"&gt;throw new &lt;/span&gt;AuthenticationError(); }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SalespersonOrderProcessing &lt;/span&gt;: NoAccessOrderProcess&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public override &lt;/span&gt;Order LookupOrder() { &lt;span style="color: green"&gt;/* code here */ &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ClerkOrderProcessing &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;SalespersonOrderProcessing&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public override void &lt;/span&gt;EnterOrder(Order o) { &lt;span style="color: green"&gt;/* code here */ &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ManagerOrderProcessing &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;ClerkOrderProcessing&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public override void &lt;/span&gt;ApproveOrder(Order o) { &lt;span style="color: green"&gt;/* code here */ &lt;/span&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This approach has the advantage of removing the authorization logic from the business logic, but it embeds the authorization logic in your class hierarchy. The designer of the business logic will need to be aware of the authorization model at design-time. However, if you know that the functions permitted to each role are going to be static, this approach has merit.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Single business class with Static-bound delegates&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;An alternate approach uses indirection through delegates. This strategy will move the logic entirely out of the class hierarchy and into the Factory class. The public methods on the business layer will call delegates that are, by default, set to the methods that perform the actual business logic. The Factory can disable certain methods by setting the delegates to null prior to handing the business layer object to the application.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public delegate &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order LookupHandlerType&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: blue"&gt;public delegate void &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ProcessOrderType&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;o);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderProcessing &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IOrderProcessing  &lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;LookupHandlerType &lt;/span&gt;LookupHandler;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ProcessOrderType &lt;/span&gt;EnterHandler;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ProcessOrderType &lt;/span&gt;ApproveHandler;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;OrderProcessing(&lt;span style="color: #2b91af"&gt;IDataLayer &lt;/span&gt;dataLayer) {&lt;br /&gt;        DataLayer = dataLayer;&lt;br /&gt;&lt;br /&gt;        LookupHandler = _LookupOrder;&lt;br /&gt;        EnterHandler = _EnterOrder;&lt;br /&gt;        ApproveHandler = _ApproveOrder;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDataLayer &lt;/span&gt;DataLayer {  &lt;span style="color: blue"&gt;get&lt;/span&gt;;  &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;LookupOrder() { &lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(LookupHandler == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AuthorizationError&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;LookupHandler();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: blue"&gt;public void &lt;/span&gt;EnterOrder(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;o) {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(EnterHandler == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AuthorizationError&lt;/span&gt;();&lt;br /&gt;        EnterHandler(o);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: blue"&gt;public void &lt;/span&gt;ApproveOrder(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;o) {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(ApproveHandler == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AuthorizationError&lt;/span&gt;();&lt;br /&gt;        ApproveOrder(o);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green"&gt;// business logic in these methods&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;_LookupOrder() { &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order&lt;/span&gt;(); }&lt;br /&gt;    &lt;span style="color: blue"&gt;private void &lt;/span&gt;_EnterOrder(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;o) { }&lt;br /&gt;    &lt;span style="color: blue"&gt;private void &lt;/span&gt;_ApproveOrder(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;o) { }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Factory&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IOrderProcessing &lt;/span&gt;CreateOrderProcessing()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: green"&gt;// set these based on role user is in.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;bool &lt;/span&gt;manager = &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;bool &lt;/span&gt;clerk = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;bool &lt;/span&gt;salesperson = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green"&gt;//var processing = container.Resolve&amp;lt;IOrderProcessing&amp;gt;() as OrderProcessing;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderProcessing &lt;/span&gt;processing = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderProcessing&lt;/span&gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MyDataLayer&lt;/span&gt;());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!manager) processing.ApproveHandler = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!clerk) processing.EnterHandler = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!salesperson) processing.LookupHandler = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;processing;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Dynamic-binding Authorization&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As a further refinement, rather than statically binding to the Handler delegate properties, we could have the names of the Handlers stored in a database or file and use Reflection to set them to null if the role disallows access. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;    public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DynamicFactory&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IOrderProcessing &lt;/span&gt;CreateOrderProcessing()&lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;            &lt;span style="color: green"&gt;//var processing = container.Resolve&amp;lt;IOrderProcessing&amp;gt;() as OrderProcessing;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderProcessing &lt;/span&gt;processing = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderProcessing&lt;/span&gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MyDataLayer&lt;/span&gt;());&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;//get user role, list of prohibited methods from authorization database&lt;br /&gt;            //&lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;prohibitedHandlers = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;()&lt;br /&gt;            //                       { &lt;span style="color: #a31515"&gt;&amp;quot;ApproveHandler&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;EnterHandler&amp;quot; &lt;/span&gt;};&lt;br /&gt;            &lt;span style="color: green"&gt;//disable access&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;handler &lt;span style="color: blue"&gt;in &lt;/span&gt;prohibitedHandlers)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;var &lt;/span&gt;field = processing.GetType().GetField(handler);&lt;br /&gt;                field.SetValue(processing, &lt;span style="color: blue"&gt;null&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;processing;&lt;br /&gt;        }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;I've presented some strategies for authorizing access to your business layer objects. It's important to keep authorization code separated from your business logic, since it is a cross-cutting concern and since security models will likely change over time, it makes sense to encapsulate the access in a Factory type object that can evolve over time. The key is that the business logic object that is handed to the application is already configured for the privileges that the user has and the authorization checking does not need to be embedded in the business logic.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fauthorization-strategies-for-business.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fauthorization-strategies-for-business.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6860124018825699030?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6860124018825699030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6860124018825699030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6860124018825699030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6860124018825699030'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/authorization-strategies-for-business.html' title='Authorization Strategies for the Business Layer'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-201961600539839897</id><published>2009-05-06T08:41:00.001-04:00</published><updated>2009-05-06T08:41:26.824-04:00</updated><title type='text'>Cool Google Chrome Tip</title><content type='html'>&lt;p&gt;Enter &lt;font face="Courier New"&gt;about:memory&lt;/font&gt;&lt;font face="ver"&gt; in the address bar.&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-201961600539839897?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/201961600539839897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=201961600539839897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/201961600539839897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/201961600539839897'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/cool-google-chrome-tip.html' title='Cool Google Chrome Tip'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7710347278620323776</id><published>2009-05-04T16:28:00.001-04:00</published><updated>2009-05-04T16:28:07.179-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><title type='text'>Windows 7 news</title><content type='html'>&lt;ul&gt;   &lt;li&gt;If you have installed the Windows 7 Beta, &lt;a href="http://blogs.technet.com/springboard/archive/2009/04/30/plan-ahead-for-windows-7-beta-and-rc-expiration-dates.aspx" target="_blank"&gt;starting July 1, your computer will shut down&lt;/a&gt; every two hours, and it will expire on August 1, 2009.&lt;/li&gt;    &lt;li&gt;Windows 7 Release Candidate is now available for MSDN subscription download.&lt;/li&gt;    &lt;li&gt;Windows 7 Release Candidate will be available for &lt;a href="http://www.microsoft.com/springboard" target="_blank"&gt;public download&lt;/a&gt; tomorrow May 5.&lt;/li&gt;    &lt;li&gt;Windows 7 Release Candidate will expire June 1, 2010. Bi-hourly shutdowns will start March 1, 2010.&lt;/li&gt;    &lt;li&gt;In both cases (Beta and RC), there will be &lt;strong&gt;no upgrade path&lt;/strong&gt; to a retail, licensed version. You will need to wipe and re-install.&lt;/li&gt;    &lt;li&gt;Windows 7 includes IE 8, Windows Media Player 12 and .NET 3.5 SP1.&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7710347278620323776?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7710347278620323776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7710347278620323776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7710347278620323776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7710347278620323776'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/windows-7-news.html' title='Windows 7 news'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7095675795038232861</id><published>2009-05-04T12:04:00.002-04:00</published><updated>2009-05-04T12:13:18.126-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>WPF Model-View-ViewModel Toolkit</title><content type='html'>&lt;p&gt; The WPF team at Microsoft has released a toolkit (version 0.1) that addresses developing UIs with the &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx" target="_blank"&gt;M-V-VM&lt;/a&gt; pattern.&lt;/p&gt;  &lt;p&gt;It's definitely a first-pass (e.g. no VB.NET support), but they are looking for feedback on this effort. There is also a bit of confusion as to how this compares to the Silverlight development pattern in &lt;a href="http://www.nikhilk.net/NET-RIA-Services-Vision-Architecture.aspx" target="_blank"&gt;RIA Services&lt;/a&gt;. See &lt;a href="http://stackoverflow.com/questions/744474/combining-net-ria-services-and-mvvm-in-silverlight-3-0" target="_blank"&gt;this StackOverflow discussion&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The toolkit includes: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A Visual Studio 2008 template (Visual C# Express 2008 also supported) &lt;/li&gt;    &lt;li&gt;Documentation      &lt;ul&gt;       &lt;li&gt;General introduction to M-V-VM &lt;/li&gt;        &lt;li&gt;Walkthrough using the VS template&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;A complete WPF application demonstrating the M-V-VM pattern&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here's a post about &lt;a href="http://www.nikhilk.net/Silverlight-ViewModel-Pattern.aspx" target="_blank"&gt;ViewModel and how it enhances the UI's testability&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Check it out here: &lt;a href="http://wpf.codeplex.com/Wiki/View.aspx?title=WPF%20Model-View-ViewModel%20Toolkit"&gt;WPF Model-View-ViewModel Toolkit&lt;/a&gt;&lt;/p&gt; &lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fwpf-model-view-viewmodel-toolkit.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f05%2fwpf-model-view-viewmodel-toolkit.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7095675795038232861?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7095675795038232861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7095675795038232861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7095675795038232861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7095675795038232861'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/05/wpf-model-view-viewmodel-toolkit.html' title='WPF Model-View-ViewModel Toolkit'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8388809147017163315</id><published>2009-04-20T10:09:00.001-04:00</published><updated>2009-04-20T14:50:14.915-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Speed up your MSDN Library experience</title><content type='html'>&lt;p&gt;This tip comes courtesy of &lt;a href="http://www.hanselman.com/blog/LowBandwidthViewAndOtherHiddenAndFutureFeaturesOfMSDN.aspx" target="_blank"&gt;Scott Hanselman's blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;MSDN is now available in a low-bandwidth mode.&lt;/p&gt;  &lt;p&gt;Step 1) Goto &lt;a title="http://msdn.microsoft.com/en-us/library/default(loband).aspx" href="http://msdn.microsoft.com/en-us/library/default(loband).aspx"&gt;http://msdn.microsoft.com/en-us/library/default(loband).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Step 2) Click on the link &lt;u&gt;&lt;font color="#0000ff"&gt;Persist low bandwidth view&lt;/font&gt;&lt;/u&gt;. It is located in the upper right corner.&lt;/p&gt;  &lt;p&gt;Step 3) Enjoy the speedy page access.&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f04%2fspeed-up-your-msdn-library-experience.html"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2finitializecomponent.blogspot.com%2f2009%2f04%2fspeed-up-your-msdn-library-experience.html" border="0" /&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8388809147017163315?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8388809147017163315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8388809147017163315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8388809147017163315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8388809147017163315'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/speed-up-your-msdn-library-experience.html' title='Speed up your MSDN Library experience'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6095653291157512134</id><published>2009-04-18T13:00:00.001-04:00</published><updated>2009-04-18T13:00:53.224-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>WPF and Silverlight Books</title><content type='html'>&lt;a href="http://www.amazon.com/gp/product/0672328917?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0672328917"&gt;Windows Presentation Foundation Unleashed (WPF)&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0672328917" width="1" border="0" /&gt;   &lt;p&gt;&lt;/p&gt; &lt;a href="http://www.amazon.com/gp/product/1590597826?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1590597826"&gt;Pro WPF: Windows Presentation Foundation in .NET 3.0&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1590597826" width="1" border="0" /&gt;   &lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/0596510373?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0596510373"&gt;Programming WPF&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0596510373" width="1" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1430224290?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1430224290"&gt;Accelerated Silverlight 3&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430224290" width="1" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1430218673?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1430218673"&gt;Pro Silverlight for the Enterprise&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430218673" width="1" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1590599497?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1590599497"&gt;Pro Silverlight 2 in C# 2008 (Windows.Net)&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=infonyxllc&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1590599497" width="1" border="0" /&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6095653291157512134?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6095653291157512134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6095653291157512134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6095653291157512134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6095653291157512134'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/wpf-and-silverlight-books.html' title='WPF and Silverlight Books'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4574777215709820391</id><published>2009-04-11T13:03:00.001-04:00</published><updated>2009-04-11T13:03:13.815-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Book Recommendation: Framework Design Guidelines (2nd ed.)</title><content type='html'>&lt;p&gt;The authoritative work by Brad Abrams and Krzysztof Cwalina on .NET framework design was recently updated.&lt;/p&gt;  &lt;p&gt;The Book: &lt;a href="http://www.amazon.com/gp/product/0321545613?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0321545613" target="_blank"&gt;Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition)&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Blog: &lt;a href="http://blogs.msdn.com/brada/archive/tags/Framework+Design+Guidelines/default.aspx"&gt;http://blogs.msdn.com/brada/archive/tags/Framework+Design+Guidelines/default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Blurb:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Framework Design Guidelines, Second Edition,&lt;/i&gt;&lt;/b&gt; teaches developers the best practices for designing reusable libraries for the Microsoft .NET Framework. Expanded and updated for .NET 3.5, this new edition focuses on the design issues that directly affect the programmability of a class library, specifically its publicly accessible APIs.&lt;/p&gt;  &lt;p&gt;This book can improve the work of any .NET developer producing code that other developers will use. It includes copious annotations to the guidelines by thirty-five prominent architects and practitioners of the .NET Framework, providing a lively discussion of the reasons for the guidelines as well as examples of when to break those guidelines.&lt;/p&gt;  &lt;p&gt;Microsoft architects Krzysztof Cwalina and Brad Abrams teach framework design from the top down. From their significant combined experience and deep insight, you will learn&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The general philosophy and fundamental principles of framework design &lt;/li&gt;    &lt;li&gt;Naming guidelines for the various parts of a framework &lt;/li&gt;    &lt;li&gt;Guidelines for the design and extending of types and members of types &lt;/li&gt;    &lt;li&gt;Issues affecting&amp;#8211;and guidelines for ensuring&amp;#8211;extensibility &lt;/li&gt;    &lt;li&gt;How (and how &lt;i&gt;not&lt;/i&gt;) to design exceptions &lt;/li&gt;    &lt;li&gt;Guidelines for&amp;#8211;and examples of&amp;#8211;common framework design patterns &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/brada/archive/tags/Framework+Design+Guidelines/default.aspx"&gt;&amp;#160;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4574777215709820391?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4574777215709820391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4574777215709820391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4574777215709820391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4574777215709820391'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/book-recommendation-framework-design.html' title='Book Recommendation: Framework Design Guidelines (2nd ed.)'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-1999720844442639260</id><published>2009-04-07T21:39:00.001-04:00</published><updated>2009-04-07T21:39:07.524-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Patterns and Practices'/><title type='text'>Enterprise Library 4.1 Hands-On Labs</title><content type='html'>&lt;p&gt;Microsoft Patterns and Practices has &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=ab3f2168-fea1-4fc2-b40c-7867d99d4b6a" target="_blank"&gt;released some Hands-on Labs&lt;/a&gt; for &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=1643758B-2986-47F7-B529-3E41584B6CE5&amp;amp;displaylang=en" target="_blank"&gt;Enterprise Library 4.1&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;.NET 3.5 and VS 2008 are required.&lt;/p&gt;  &lt;p&gt;This set of Hands-on Labs is a guide to learn about the application blocks included with Enterprise Library 4.1 and to leverage their capabilities in various application contexts. It includes Caching, Cryptography, Data Access, Exception Handling, Interception, Logging, Security, Validation, and Unity Hands-on Labs. &lt;/p&gt;  &lt;p&gt;Docs for Enterprise Library 4.1 (10/2008) &lt;a href="http://entlib.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18859" target="_blank"&gt;are here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-1999720844442639260?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/1999720844442639260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=1999720844442639260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1999720844442639260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1999720844442639260'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/enterprise-library-41-hands-on-labs.html' title='Enterprise Library 4.1 Hands-On Labs'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3931975110815560256</id><published>2009-04-07T20:56:00.001-04:00</published><updated>2009-04-07T21:06:30.786-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQ Links</title><content type='html'>&lt;p&gt;The MSDN Site: &lt;a href="http://msdn.microsoft.com/en-us/vbasic/aa904594.aspx"&gt;http://msdn.microsoft.com/en-us/vbasic/aa904594.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Wikipedia: &lt;a href="http://en.wikipedia.org/wiki/Language_Integrated_Query"&gt;http://en.wikipedia.org/wiki/Language_Integrated_Query&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;LINQ (Language Integrated Query) was delivered in .NET 3.5 and Visual Studio 2008. It addreses O/R mapping issues by making query operations like SQL statements part of the programming language. It also offers built-in support for querying in-memory collections like arrays or lists, XML, DataSets, and relational databases.It also allows you to develop queries in your native development language (with IntelliSense).&lt;/p&gt;  &lt;p&gt;LINQ to XML: It is recommended that developers &lt;a href="http://blogs.msdn.com/xmlteam/archive/2009/03/31/converting-from-xmldocument-to-xdocument.aspx" target="_blank"&gt;switch over from coding against the XmlDocument DOM to LINQ's XDocument&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;LINQ to SQL: &lt;a href="http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx" target="_blank"&gt;Deprecated...&lt;/a&gt; use LINQ to Entities&lt;/p&gt;  &lt;p&gt;LINQ to Entities: &lt;a href="http://weblogs.asp.net/zeeshanhirani/archive/2008/12/18/my-christmas-present-to-the-entity-framework-community.aspx" target="_blank"&gt;Entity Framework Learning Guide&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Books: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0321564162?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321564162"&gt;Essential LINQ (Microsoft .NET Development Series)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/1590597893?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597893"&gt;Pro LINQ: Language Integrated Query in C# 2008 (Windows.Net)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/059652028X?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=059652028X"&gt;Programming Entity Framework&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/1933988169?ie=UTF8&amp;amp;tag=infonyxllc&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1933988169"&gt;LINQ in Action&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3931975110815560256?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3931975110815560256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3931975110815560256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3931975110815560256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3931975110815560256'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/linq-links.html' title='LINQ Links'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3470646413893891291</id><published>2009-04-01T07:57:00.001-04:00</published><updated>2009-04-01T07:57:45.854-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 3 Beta</title><content type='html'>&lt;p&gt;&lt;a href="http://silverlight.net/getstarted/silverlight3/default.aspx"&gt;http://silverlight.net/getstarted/silverlight3/default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Silverlight 3 Beta was unveiled at MIX09. It is a preview release which continues Silverlight&amp;#8217;s track record of rapid innovation - introducing more than 50 new features, including support for running Silverlight applications out of the browser, dramatic video performance and quality improvements, and features that radically improve developer productivity.&lt;/p&gt;  &lt;p&gt;Important notes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;This is a developer beta release only! This means there is no &amp;#8220;go-live&amp;#8221; licensing available and the end-user runtime of Silverlight 3 is not available. The tools below are intended for software developers only.&lt;/li&gt;    &lt;li&gt;Once you install the Silverlight 3 Beta Tools for Visual Studio, your development environment will be a Silverlight 3 Beta environment.&amp;#160; Visual Studio 2008 SP1 does not support multi-targeting for Silverlight applications so you will be unable to develop Silverlight 2 applications once these tools are installed.&amp;#160; We recommend that you install the Silverlight 3 Beta tools on a separate environment if you still need to have the ability to develop Silverlight 2 applications.&lt;/li&gt;    &lt;li&gt;Ensure that you have either &lt;a href="http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx"&gt;Visual Studio 2008 SP1&lt;/a&gt; or &lt;a href="http://www.microsoft.com/express/vwd/"&gt;Visual Web Developer Express 2008 SP1&lt;/a&gt; installed as it is a prerequisite for the Silverlight 3 Beta Tools for Visual Studio. &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3470646413893891291?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3470646413893891291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3470646413893891291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3470646413893891291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3470646413893891291'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/04/silverlight-3-beta.html' title='Silverlight 3 Beta'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8998962665458678661</id><published>2009-03-25T11:29:00.001-04:00</published><updated>2009-03-25T11:29:20.620-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Google Chrome withstands security testing</title><content type='html'>&lt;p&gt;From &lt;a title="http://arstechnica.com/security/news/2009/03/chrome-is-the-only-browser-left-standing-in-pwn2own-contest.ars" href="http://arstechnica.com/security/news/2009/03/chrome-is-the-only-browser-left-standing-in-pwn2own-contest.ars" target="_blank"&gt;Ars Technica&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;A recent contest at CanSecWest, an event that brings together some of the most skilled experts in the security community, has demonstrated that the three most popular browser are susceptible to security bugs despite the vigilance and engineering prowess of their creators. Firefox, Safari, and Internet Explorer were all exploited during the &lt;a href="http://dvlabs.tippingpoint.com/blog/2009/02/25/pwn2own-2009"&gt;Pwn2Own competition&lt;/a&gt; that took place at the conference. Google's Chrome browser, however, was the only one left standing&amp;#8212;a victory that security researchers attribute to its innovative sandbox feature.&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8998962665458678661?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8998962665458678661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8998962665458678661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8998962665458678661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8998962665458678661'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/03/google-chrome-withstands-security.html' title='Google Chrome withstands security testing'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6458060470791692122</id><published>2009-03-24T15:13:00.001-04:00</published><updated>2009-03-24T17:11:56.699-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>MIX09 Sessions</title><content type='html'>&lt;p&gt;Microsoft's MIX conference took place last week in Las Vegas, NV. It's a gathering of designers and developers who are focused on using Microsoft's latest and greatest tools to build web sites. &lt;/p&gt;  &lt;p&gt;Silverlight and WPF are increasingly being seen as relevant tools for building line-of-business applications. Here are some of the talks that speak to Professional LOB app developers.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a title="http://videos.visitmix.com/MIX09/T25F" href="http://videos.visitmix.com/MIX09/T25F" target="_blank"&gt;Web Development Using Microsoft Visual Studio: Now and in the Future&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="http://videos.visitmix.com/MIX09/T39F" href="http://videos.visitmix.com/MIX09/T39F" target="_blank"&gt;What's New in Windows Presentation Foundation (WPF) 4&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="http://videos.visitmix.com/MIX09/T73M" href="http://videos.visitmix.com/MIX09/T73M" target="_blank"&gt;What's New for Microsoft Silverlight and Microsoft Windows Presentation Foundation (WPF) Developers in Microsoft Visual Studio 2010&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="http://videos.visitmix.com/MIX09/T83M" href="http://videos.visitmix.com/MIX09/T83M" target="_blank"&gt;Automated User Interface (UI) Testing with Microsoft Visual Studio Team System 2010&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/T69M"&gt;Microsoft Silverlight Is Ready for Business&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/C21F"&gt;User Experience Design Patterns for Business Applications with Microsoft Silverlight 3&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/T40F"&gt;Building Amazing Business Centric Applications with Microsoft Silverlight 3&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/T45F"&gt;Building Out of Browser Experiences with Microsoft Silverlight 3&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/T87F"&gt;Microsoft Silverlight and Windows Presentation Foundation (WPF): Sharing Skills and Code&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://videos.visitmix.com/MIX09/T41F"&gt;.NET RIA Services - Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NET&lt;/a&gt; [Added]&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6458060470791692122?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6458060470791692122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6458060470791692122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6458060470791692122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6458060470791692122'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/03/mix09-sessions.html' title='MIX09 Sessions'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3832433884644929485</id><published>2009-03-23T15:50:00.001-04:00</published><updated>2009-03-23T15:50:08.971-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Ninject'/><title type='text'>Dependency Injection, is it for you?</title><content type='html'>&lt;p&gt;People have been trying to convince you how great Dependency Injection is. Maybe they're calling it Inversion of Control. Either way, you're not buying it.&lt;/p&gt;  &lt;p&gt;If you haven't been able to see the benefit, try reading &lt;a href="http://www.codethinked.com/" target="_blank"&gt;Justin's&lt;/a&gt; blog post: &lt;a href="http://www.codethinked.com/post/2009/03/23/To-Inject-Or-Not-To-Inject.aspx" target="_blank"&gt;To Inject or Not To Inject&lt;/a&gt; (warning: it is long, but worth it).&lt;/p&gt;  &lt;p&gt;Justin focuses on complex configuration scenarios, but I like to recommend DI for its reusability. Self-configuring and &amp;quot;service locator&amp;quot; configuring tends to constrain you to using a particular type of configuration infrastructure, making it difficult to reuse your components, not to mention unit testing.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3832433884644929485?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3832433884644929485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3832433884644929485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3832433884644929485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3832433884644929485'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/03/dependency-injection-is-it-for-you.html' title='Dependency Injection, is it for you?'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4666200180626683480</id><published>2009-03-23T15:12:00.001-04:00</published><updated>2009-05-30T10:09:23.066-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET RIA Services'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Patterns and Practices'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Development'/><title type='text'>Roundup - .NET Application Development Platforms</title><content type='html'>&lt;p&gt;I've put together a collection of links from around the web on tools and technologies for developing .NET Line-of-business applications.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/getstarted/silverlight3/default.aspx" target="_blank"&gt;Silverlight 3 (beta)&lt;/a&gt; - Microsoft &lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/Learn/" target="_blank"&gt;Silverlight Labs&lt;/a&gt; - Microsoft&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.codeplex.com/" target="_blank"&gt;Silverlight Toolkit&lt;/a&gt; - CodePlex&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeplex.com/wpf/Wiki/View.aspx?title=Southridge%20Lab" target="_blank"&gt;WPF Hands-on lab (Southridge)&lt;/a&gt; - Microsoft Redmond&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/switzerland/msdn/de/presentationfinder/detail.mspx?id=106160" target="_blank"&gt;WPF Hands-on lab (Order Manager)&lt;/a&gt; - Microsoft Switzerland&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wpf.codeplex.com/" target="_blank"&gt;WPF&lt;/a&gt; - CodePlex&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd458809.aspx" target="_blank"&gt;Composite Application Guidance for WPF and Silverlight&lt;/a&gt; (&lt;a href="http://compositewpf.codeplex.com/" target="_blank"&gt;Prism&lt;/a&gt;) - Microsoft P&amp;amp;P&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.silverlightshow.net/items/Building-a-Framework-for-Silverlight-Line-Of-Business-Applications.aspx" target="_blank"&gt;Building a Framework for Silverlight&lt;/a&gt; - SilverlightShow&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeplex.com/caliburn" target="_blank"&gt;Caliburn&lt;/a&gt; - Rob Eisenberg&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lhotka.net/cslanet/" target="_blank"&gt;CSLA.NET (WPF and Silverlight)&lt;/a&gt; - Rocky Lhotka&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.ideablade.com/DevForceWinClient/DevForceWinClient_overview.html" target="_blank"&gt;DevForce WinClient&lt;/a&gt; - &lt;a href="http://www.ideablade.com/index.html" target="_blank"&gt;IdeaBlade&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.ideablade.com/DevForceSilverlight/DevForceSilverlight_overview.aspx" target="_blank"&gt;DevForce Silverlight&lt;/a&gt; - &lt;a href="http://www.ideablade.com/index.html" target="_blank"&gt;IdeaBlade&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nintex.com/en-US/Products/Pages/Workflow2007.aspx" target="_blank"&gt;Nintex Workflow&lt;/a&gt; - &lt;a href="http://www.nintex.com/en-US/Pages/default.aspx" target="_blank"&gt;Nintex&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;UPDATE: I added RIA services after listening to &lt;a href="http://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx" target="_blank"&gt;Brad Abram's&lt;/a&gt; talk on &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=430" target="_blank"&gt;.NET Rocks&lt;/a&gt;. It was announced at &lt;a href="http://live.visitmix.com/" target="_blank"&gt;MIX09&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/RiaServices" target="_blank"&gt;RIA Services&lt;/a&gt; - Microsoft &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.silverlightshow.net/items/Creating-applications-with-.NET-RIA-Service-Part-1-Introduction.aspx" target="_blank"&gt;RIA Services on SliverlightShow&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4666200180626683480?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4666200180626683480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4666200180626683480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4666200180626683480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4666200180626683480'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/03/roundup-net-application-development.html' title='Roundup - .NET Application Development Platforms'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4395600819255889260</id><published>2009-01-09T13:47:00.001-05:00</published><updated>2009-01-09T14:03:28.843-05:00</updated><title type='text'>Welcome to Windows 7</title><content type='html'>&lt;p&gt;&lt;a href="http://chris123nt.com/wp-content/uploads/2009/01/7.png"&gt;&lt;img title="7" height="63" alt="7" src="http://chris123nt.com/wp-content/uploads/2009/01/7-thumb.png" width="240" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Do you like to get your hands on the latest and greatest? &lt;/p&gt;  &lt;p&gt;Microsoft is posting a beta of its next generation Windows OS later today at the &lt;a href="http://www.microsoft.com/windows/windows-7/default.aspx" target="_blank"&gt;Windows 7 Web page&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4395600819255889260?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4395600819255889260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4395600819255889260' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4395600819255889260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4395600819255889260'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/01/welcome-to-windows-7.html' title='Welcome to Windows 7'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8630897492793828697</id><published>2009-01-08T15:02:00.001-05:00</published><updated>2009-01-08T15:02:41.392-05:00</updated><title type='text'>SharpDevelop</title><content type='html'>&lt;p&gt;If you are interested in a free Open Source Development Environment for .NET check out &lt;a href="http://sharpdevelop.net/OpenSource/SD/Default.aspx" target="_blank"&gt;#develop&lt;/a&gt; (pronounced SharpDevelop). It supports C#. VB.NET and Boo. &lt;/p&gt;  &lt;p&gt;Currently it only does .NET 1.1 and 2.0, but they are working on support for .NET 3.5, which will also add IronPython and F#.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8630897492793828697?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8630897492793828697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8630897492793828697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8630897492793828697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8630897492793828697'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2009/01/sharpdevelop.html' title='SharpDevelop'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4768363295167577789</id><published>2008-12-30T15:58:00.001-05:00</published><updated>2008-12-30T16:00:38.873-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Unity Application Block 1.2 for Silverlight - December 2008</title><content type='html'>&lt;p&gt;Not many changes here for Silverlight, just adjustments to the packaging to allow it to run in Silverlight... &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd362339.aspx"&gt;Unity Application Block 1.2 for Silverlight - December 2008&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And -- not sure how I missed it, but &lt;a href="http://msdn.microsoft.com/en-us/library/dd203104.aspx" target="_blank"&gt;Unity 1.2 was released in October&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Ah, I remember, I was on vacation...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4768363295167577789?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4768363295167577789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4768363295167577789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4768363295167577789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4768363295167577789'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/12/unity-application-block-12-for.html' title='Unity Application Block 1.2 for Silverlight - December 2008'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8194331202275294020</id><published>2008-12-19T11:32:00.001-05:00</published><updated>2008-12-19T11:32:01.284-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQ to SQL - Dead or alive?</title><content type='html'>&lt;p&gt;Microsoft claims that LINQ to SQL is not a dead technology, despite their focus on Entity Framework. From &lt;a href="http://reddevnews.com/blogs/weblog.aspx?blog=3036" target="_blank"&gt;Redmond Developer News&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Tim Mallalieu, the program manager for both LINQ to SQL and the Entity Framework, ... says Microsoft anticipated the backlash but said both data access interfaces will be better off for this move. For those who don't think the Entity Framework is a suitable replacement, Mallalieu said stay tuned.&lt;/p&gt;    &lt;p&gt;&amp;quot;There's some pretty nifty stuff we're doing in the beta 2 time frame that we are not speaking about as yet, I think it will give you a better experience and will reduce the anxiety that people have around the Entity Framework,&amp;quot; Mallalieu said. &amp;quot;In terms of capabilities, I think will make the overall integrated experience of ASP.NET, Dynamic Data, MVC and these other things easier, we did a little bit of triaging and feedback, there is some valid feedback around complexity in the Entity Framework and we are doing things to address that. &amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Especially in light of the fact that &lt;a href="http://msdn.microsoft.com/en-us/library/bb386976.aspx" target="_blank"&gt;LINQ to SQL&lt;/a&gt; is specific to SQL Server, I think it's best to wait a while to see what happens with &lt;a href="http://msdn.microsoft.com/en-us/library/bb399572.aspx" target="_blank"&gt;Entity Framework&lt;/a&gt;. Note that there are quite a few folks who &lt;a href="http://weblogs.asp.net/bsimser/archive/2008/06/23/ado-net-enity-framework-vote-of-no-confidence.aspx" target="_blank"&gt;aren't happy with the way it has turned out so far&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8194331202275294020?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8194331202275294020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8194331202275294020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8194331202275294020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8194331202275294020'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/12/linq-to-sql-dead-or-alive.html' title='LINQ to SQL - Dead or alive?'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6770237681780196845</id><published>2008-10-21T10:10:00.001-04:00</published><updated>2008-10-21T10:10:27.235-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 2 released</title><content type='html'>&lt;p&gt;Microsoft &lt;a href="http://www.microsoft.com/silverlight/" target="_blank"&gt;released Silverlight 2 last week&lt;/a&gt;. Install it &lt;a href="http://www.microsoft.com/silverlight/resources/install.aspx" target="_blank"&gt;from here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;More &lt;a href="http://silverlight.net/default.aspx" target="_blank"&gt;resources here&lt;/a&gt;. &lt;a href="http://silverlight.net/Learn/" target="_blank"&gt;Tutorials and videos&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6770237681780196845?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6770237681780196845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6770237681780196845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6770237681780196845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6770237681780196845'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/silverlight-2-released.html' title='Silverlight 2 released'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4826681011983347014</id><published>2008-10-08T17:00:00.001-04:00</published><updated>2008-10-08T17:00:13.041-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='AOP'/><title type='text'>Unity 1.2 and Interception</title><content type='html'>&lt;p&gt;&lt;a href="http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=33771" target="_blank"&gt;Unity 1.2&lt;/a&gt; is under development, but we do know that it will support Interception. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pnpguidance.net" target="_blank"&gt;David Hayden&lt;/a&gt; has a nice &lt;a href="http://pnpguidance.net/Screencast/UnityInterceptionExtensionRemotingPolicyInjectorScreencastUnityTutorials.aspx" target="_blank"&gt;screencast&lt;/a&gt; showing how it works.&lt;/p&gt;  &lt;p&gt;David shows how you can add an interceptor to time the execution of a method in an object that Unity has created for you. Cool stuff. &lt;a href="http://pnpguidance.net/Screencast/UnityInterceptionExtensionRemotingPolicyInjectorScreencastUnityTutorials.aspx" target="_blank"&gt;Check it out!&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4826681011983347014?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4826681011983347014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4826681011983347014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4826681011983347014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4826681011983347014'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/unity-12-and-interception.html' title='Unity 1.2 and Interception'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-612832265671615482</id><published>2008-10-06T10:23:00.001-04:00</published><updated>2008-10-06T10:34:01.012-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><title type='text'>Fun with C# 3.0 (#4) - Nullable types and the ?? operator</title><content type='html'>&lt;p&gt;C# has reference types and value types. Reference types are commonly called objects, and variables that are declared to be of a reference type can refer to an object or be &lt;strong&gt;&lt;em&gt;null&lt;/em&gt;&lt;/strong&gt;. Value types (int or bool, for example) can be stored in variables that contain the actual value, and therefore can never be null.&lt;/p&gt;  &lt;p&gt;Sometimes it is useful to have a value type that can have a null value, so this feature &lt;a href="http://msdn.microsoft.com/en-us/library/2cf62fcy.aspx" target="_blank"&gt;has been added to C# 3.0&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This feature is implemented using generics and the type System.Nullable&amp;lt;T&amp;gt;, the shorthand for which is T?. The property HasValue can be used to see if the variable is null. Here's an example:&lt;/p&gt;&lt;blockquote&gt;   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;int&lt;/span&gt;? x = 10;&lt;br /&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(x.HasValue)&lt;br /&gt;{&lt;br /&gt;    System.&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(x.Value);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: blue"&gt;else&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    System.&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Undefined&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;A nullable type can not be assigned to a value type. The following will not compile:&lt;/p&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;int&lt;/span&gt;? x = 10;&lt;br /&gt;&lt;span style="color: blue"&gt;int &lt;/span&gt;y;&lt;br /&gt;y = x;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;Rather use the Value property:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;int&lt;/span&gt;? x = 10;&lt;br /&gt;&lt;span style="color: blue"&gt;int &lt;/span&gt;y;&lt;br /&gt;y = x.Value;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;Accessing Value will throw an InvalidOperationException if the nullable type is null. Use the ?? to assign a default value.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;int&lt;/span&gt;? x = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue"&gt;int &lt;/span&gt;y;&lt;br /&gt;y = x ?? 0;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;This is equivalent to:&lt;/p&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;y = x.HasValue ? x.Value : 0;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;Usage of the ?? operator is not limited to Nullable types. For example:&lt;/p&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;name = enteredName ?? &lt;span style="color: #a31515"&gt;&amp;quot;Name not entered.&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-612832265671615482?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/612832265671615482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=612832265671615482' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/612832265671615482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/612832265671615482'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/fun-with-c-30-4-nullable-types-and.html' title='Fun with C# 3.0 (#4) - Nullable types and the ?? operator'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-9204944279886463581</id><published>2008-10-03T15:14:00.002-04:00</published><updated>2008-10-06T15:45:51.279-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>The Common Service Locator</title><content type='html'>&lt;p&gt;&lt;a href="http://initializecomponent.blogspot.com/2008/06/container-dependency-anti-pattern.html"&gt;I have argued against&lt;/a&gt; making 'hard' references to an underlying Dependency Injection (or IoC) container; rather, allow the container to do the work for you, namely, inject the dependencies. I realize that it can be difficult in practice, and apparently so have others.&lt;/p&gt;&lt;p&gt;A group of DI container authors have come together to define a common interface for using the underlying containers without creating a hard reference to a particular implementation. This is useful when you are writing code that needs to use a container to resolve a dependency (i.e. get an instance) but you don't know or care what container is being used. &lt;/p&gt;&lt;p&gt;So now we have the &lt;a href="http://www.codeplex.com/CommonServiceLocator" target="_blank"&gt;Common Service Locator&lt;/a&gt; library. Thanks to &lt;a href="http://ayende.com/Blog/archive/2008/10/02/the-common-service-locator-library.aspx" target="_blank"&gt;Ayende for blogging&lt;/a&gt; it. UPDATE: Also &lt;a href="http://codebetter.com/blogs/glenn.block/archive/2008/10/02/iservicelocator-a-step-toward-ioc-container-service-locator-detente.aspx" target="_blank"&gt;Glenn Block&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Each container needs an adapter to implement the interface and do the translation from the common method calls to the native container calls. This allows all container references to be declared as &lt;strong&gt;Microsoft.Practices.ServiceLocation.IServiceLocator&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Your code has two ways of getting the container:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The IServiceLocater reference can be supplied by the calling code and you just use it, or &lt;/li&gt;&lt;li&gt;You code can use a static property, &lt;strong&gt;ServiceLocator.Current&lt;/strong&gt;. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Here is the interface that you will use (&lt;a href="http://www.codeplex.com/CommonServiceLocator/Wiki/View.aspx?title=API%20Reference&amp;amp;referringTitle=Home" target="_blank"&gt;API Reference&lt;/a&gt;):&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;&lt;br /&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;Microsoft.Practices.ServiceLocation&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color:green;"&gt;// Summary:&lt;br /&gt;    //     The generic Service Locator interface. This interface is used to retrieve&lt;br /&gt;    //     services (instances identified by type and optional name) from a container.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IServiceLocator &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;IServiceProvider&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color:green;"&gt;// Summary:&lt;br /&gt;        //     Get all instances of the given TService currently registered in the container.&lt;br /&gt;        //&lt;br /&gt;        // Type parameters:&lt;br /&gt;        //   TService:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     A sequence of instances of the requested TService.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is are errors resolving the service instance.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;TService&amp;gt; GetAllInstances&amp;lt;TService&amp;gt;();&lt;br /&gt;        &lt;span style="color:green;"&gt;//&lt;br /&gt;        // Summary:&lt;br /&gt;        //     Get all instances of the given serviceType currently registered in the container.&lt;br /&gt;        //&lt;br /&gt;        // Parameters:&lt;br /&gt;        //   serviceType:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     A sequence of instances of the requested serviceType.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is are errors resolving the service instance.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color:blue;"&gt;object&lt;/span&gt;&amp;gt; GetAllInstances(&lt;span style="color:#2b91af;"&gt;Type &lt;/span&gt;serviceType);&lt;br /&gt;        &lt;span style="color:green;"&gt;//&lt;br /&gt;        // Summary:&lt;br /&gt;        //     Get an instance of the given TService.&lt;br /&gt;        //&lt;br /&gt;        // Type parameters:&lt;br /&gt;        //   TService:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     The requested service instance.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is are errors resolving the service instance.&lt;br /&gt;        &lt;/span&gt;TService GetInstance&amp;lt;TService&amp;gt;();&lt;br /&gt;        &lt;span style="color:green;"&gt;//&lt;br /&gt;        // Summary:&lt;br /&gt;        //     Get an instance of the given named TService.&lt;br /&gt;        //&lt;br /&gt;        // Parameters:&lt;br /&gt;        //   key:&lt;br /&gt;        //     Name the object was registered with.&lt;br /&gt;        //&lt;br /&gt;        // Type parameters:&lt;br /&gt;        //   TService:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     The requested service instance.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is are errors resolving the service instance.&lt;br /&gt;        &lt;/span&gt;TService GetInstance&amp;lt;TService&amp;gt;(&lt;span style="color:blue;"&gt;string &lt;/span&gt;key);&lt;br /&gt;        &lt;span style="color:green;"&gt;//&lt;br /&gt;        // Summary:&lt;br /&gt;        //     Get an instance of the given serviceType.&lt;br /&gt;        //&lt;br /&gt;        // Parameters:&lt;br /&gt;        //   serviceType:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     The requested service instance.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is an error resolving the service instance.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;object &lt;/span&gt;GetInstance(&lt;span style="color:#2b91af;"&gt;Type &lt;/span&gt;serviceType);&lt;br /&gt;        &lt;span style="color:green;"&gt;//&lt;br /&gt;        // Summary:&lt;br /&gt;        //     Get an instance of the given named serviceType.&lt;br /&gt;        //&lt;br /&gt;        // Parameters:&lt;br /&gt;        //   serviceType:&lt;br /&gt;        //     Type of object requested.&lt;br /&gt;        //&lt;br /&gt;        //   key:&lt;br /&gt;        //     Name the object was registered with.&lt;br /&gt;        //&lt;br /&gt;        // Returns:&lt;br /&gt;        //     The requested service instance.&lt;br /&gt;        //&lt;br /&gt;        // Exceptions:&lt;br /&gt;        //   Microsoft.Practices.ServiceLocation.ActivationException:&lt;br /&gt;        //     if there is an error resolving the service instance.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;object &lt;/span&gt;GetInstance(&lt;span style="color:#2b91af;"&gt;Type &lt;/span&gt;serviceType, &lt;span style="color:blue;"&gt;string &lt;/span&gt;key);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here are the containers that have adapters at the moment:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/CommonServiceLocator/Wiki/View.aspx?title=Castle%20Windsor%20Adapter&amp;amp;referringTitle=Home"&gt;Castle Windsor Adapter&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/CommonServiceLocator/Wiki/View.aspx?title=Spring%20.NET%20Adapter&amp;amp;referringTitle=Home"&gt;Spring .NET Adapter&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/CommonServiceLocator/Wiki/View.aspx?title=Unity%20Adapter&amp;amp;referringTitle=Home"&gt;Unity Adapter&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;MEF Adapter (TBD) &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;StructureMap Adapter (TBD) &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I recommend IServiceLocator be used in all components that might need a reference to a container. Note that they are no common calls for configuring the container because this is a container-specific task that should be handled in the calling code.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-9204944279886463581?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/9204944279886463581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=9204944279886463581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9204944279886463581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/9204944279886463581'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/common-service-locator.html' title='The Common Service Locator'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5730112349297334330</id><published>2008-10-02T14:26:00.001-04:00</published><updated>2008-10-02T14:30:39.130-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Dublin'/><title type='text'>Microsoft "Dublin" addresses composite SOA applications</title><content type='html'>&lt;p&gt;Microsoft just released a white paper outlining how .NET Framework 4.0 and new Windows Server capabilities (&lt;a href="http://www.microsoft.com/net/dublin.aspx" target="_blank"&gt;code-named Dublin&lt;/a&gt;) will help developers design, build and maintain Composite Applications. The white paper is &lt;a href="http://download.microsoft.com/download/5/9/B/59B74A2A-245D-4304-802E-E0A0800FACD3/Dublin__NET_4_overview.docx" target="_blank"&gt;available here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;What are composite SOA applications? Applications that are composed by assembling and integrating reusable services. This makes the deployment and management of applications (and servers) more complex and creates new requirements to address scalability, performance and reliability.&lt;/p&gt;  &lt;p&gt;Microsoft has announced .NET Framework 4.0 to add functionality to WCF and WF, and also &amp;quot;Dublin&amp;quot;, an add-on to Windows Server 2008, that will make SOA applications and servers easier to deploy, configure, manage and scale. The first preview will be available at the PDC at the end of October.&lt;/p&gt;  &lt;p&gt;See the chart below from the white paper:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;table class="MsoTableGrid" style="border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none; border-collapse: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" cellspacing="0" cellpadding="0" border="1"&gt;&lt;tbody&gt;       &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;         &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; background: #d9d9d9; padding-bottom: 0in; border-left: black 1pt solid; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-background-themecolor: background1; mso-background-themeshade: 217" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Windows Communication Foundation 4.0 &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; background: #d9d9d9; padding-bottom: 0in; border-left: medium none; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Windows Workflow                &lt;br /&gt;Foundation 4.0 &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; background: #d9d9d9; padding-bottom: 0in; border-left: medium none; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Windows Server                &lt;br /&gt;&amp;quot;Dublin&amp;quot; technologies &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 1; mso-yfti-lastrow: yes"&gt;         &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;RESTful enhancements &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Simplifying the building of REST Singleton &amp;amp; Collection Services, ATOM Feed and Publishing Protocol Services, and HTTP Plain XML Services using WCF &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;WCF REST Starter Kit to be released on Codeplex to get early feedback &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Messaging enhancements &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Transports - UDP, MQ, Local in-process &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Protocols - SOAP over UDP, WS-Discovery, WS-BusinessActivity, WS-I BP 1.2 &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Duplex durable messaging&lt;/span&gt; &lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Correlation enhancements &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraph" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Content and context driven, One-way support &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Declarative Workflow Services &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Seamless integration between WF and WCF and unified XAML model &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Build entire application in XAML, from presentation to data to services to workflow &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; line-height: normal; mso-add-space: auto"&gt;&lt;span style="font-size: 9pt"&gt;&lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&amp;#160;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="mso-bidi-font-size: 9.0pt"&gt;Significant improvements in performance and scalability &lt;/span&gt;&lt;/b&gt;              &lt;p&gt;&lt;/p&gt;           &lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraph" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Ten-fold improvement in performance &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;New workflow flow-control models and pre-built activities &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Flowcharts, rules &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Expanded built-in activities &amp;#8211; PowerShell, database, messaging, etc. &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Enhancements in workflow modeling &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 6pt 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Persistence control, transaction flow, compensation support, data binding and scoping&lt;b style="mso-bidi-font-weight: normal"&gt; &lt;/b&gt;&lt;/span&gt;              &lt;p&gt;&lt;/p&gt;           &lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 6pt 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Rules composable and seamlessly integrated with workflow engine &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 4pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Updated visual designer &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Easier to use by end-users &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Easier to rehost by ISVs &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Ability to debug XAML&lt;/span&gt; &lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: medium none; padding-left: 5.4pt; padding-bottom: 0in; border-left: medium none; width: 159.6pt; padding-top: 0in; border-bottom: black 1pt solid; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1" valign="top" width="213"&gt;           &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Provide standard host for WF and WCF applications&lt;span style="mso-tab-count: 1"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Pre-built developer services &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Message-based correlation &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Message forwarding service &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Content-based message routing &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Compensation service for long-running transactions &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Greater scalability and easier manageability &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Enable scale-out of stateful workflow applications &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Persisting and rehydrating state for high scalability &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 6pt 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Enhanced management and monitoring functions &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoListParagraphCxSpLast" style="margin: 6pt 0in 0pt 18.3pt; text-indent: -9pt; line-height: normal; mso-add-space: auto; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9pt; font-family: symbol; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&amp;#183;&lt;span roman??="roman??" new="new" times="times"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;Tracking store for workflow events &lt;/span&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin: 6pt 0in 0pt; line-height: normal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Supports &amp;#8220;Oslo&amp;#8221; modeling platform &lt;/b&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;            &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;/p&gt;            &lt;p&gt;&amp;#160;&lt;/p&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Key takeaways:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft will make it easier to design applications as WF workflows that are easily integrated into WCF services. &lt;/li&gt;    &lt;li&gt;WCF and WF both use XAML. Microsoft will move to a &amp;quot;unified&amp;quot; XAML to make the integration easier. &lt;/li&gt;    &lt;li&gt;Microsoft is moving more toward REST for web services due to its simplicity. The REST Starter Kit will be available on Codeplex in the near future. &lt;/li&gt;    &lt;li&gt;The server infrastructure (Dublin) to host and manage these new types of applications will become available after .NET 4 and Visual Studio 2010 ship. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Links:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/usisvde/archive/2008/10/01/wcf-wf-application-server-enhancements-announced-available-at-pdc.aspx" target="_blank"&gt;Microsoft US ISV Developer Evangelism Team&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/stevemar/archive/2008/10/01/the-road-to-pdc-net-framework-4-0-and-dublin.aspx" target="_blank"&gt;Steve Martin, Connected Systems Division (Microsoft)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.betanews.com/article/NET_Framework_40_to_become_less_SOAPcentric_embrace_REST/1222895836/2" target="_blank"&gt;What's the difference between REST and SOAP? (Betanews)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.sdtimes.com/MICROSOFT_DETAILS_WCF_AND_WF_IN_NEXT_GEN_NET/About_NET_and_WINDOWS_and_WINDOWSSERVER_and_MICROSOFT/32924" target="_blank"&gt;SD Times&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5730112349297334330?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5730112349297334330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5730112349297334330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5730112349297334330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5730112349297334330'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/microsoft-addresses-composite-soa.html' title='Microsoft &amp;quot;Dublin&amp;quot; addresses composite SOA applications'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-1453472279214164835</id><published>2008-10-01T11:49:00.001-04:00</published><updated>2008-10-01T11:49:04.778-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Visual Studio Training Kit updated for 2008 SP1 and .NET SP1</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/allandcp/pages/vs2008.aspx" target="_blank"&gt;Allan dCP has has a post&lt;/a&gt; about the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8bdaa836-0bba-4393-94db-6c3c4a0c98a1&amp;amp;DisplayLang=en" target="_blank"&gt;updated (for SP1) Visual Studio 2008 training kit&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Notable: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/allandcp/archive/2008/08/12/go-get-it-visual-studio-2008-net-framework-3-5-sp1-and-the-training-kit.aspx" target="_blank"&gt;.NET SP1 Training Kit - new as of August 2008&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visitmix.com/university/Default.aspx" target="_blank"&gt;MIX University - source for WPF and Silverlight (and more) training&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/click/SharePointDeveloper/" target="_blank"&gt;SharePoint Development for .NET Developers&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-1453472279214164835?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/1453472279214164835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=1453472279214164835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1453472279214164835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1453472279214164835'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/10/visual-studio-training-kit-updated-for.html' title='Visual Studio Training Kit updated for 2008 SP1 and .NET SP1'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5014866945474360408</id><published>2008-09-29T14:15:00.001-04:00</published><updated>2008-09-29T14:15:53.266-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><title type='text'>Visual Studio 2010/.NET 4.0 Roundup</title><content type='html'>&lt;p&gt;Today Microsoft announced that, although recently referred to as Visual Studio 10 or &amp;quot;Hawaii&amp;quot;, the official name of the next release will be Visual Studio 2010 and it will be accompanied by .NET Framework 4.0.&lt;/p&gt;  &lt;p&gt;eWeek reports:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;em&gt;Microsoft announces Visual Studio 2010 and .NET Framework 4.0, and says the overall development strategy revolves around five pillars. The first pillar involves the Visual Studio Team System (VSTS) 2010, formerly codenamed &amp;#8220;&lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/bb725993.aspx" target="_blank"&gt;&lt;em&gt;Rosario&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;#8221;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Microsoft has announced the name of the next version of its developer tools and platform: &lt;/em&gt;&lt;a href="http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx" target="_blank"&gt;&lt;em&gt;Visual Studio 2010 and the .NET Framework 4.0.&lt;/em&gt;&lt;/a&gt;&lt;em&gt; &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;In the announcement on Sept. 29, Microsoft also described the next release through the following five focus areas: riding the next-generation platform wave, inspiring developer delight, powering breakthrough departmental applications, enabling emerging trends such as cloud computing, and democratizing ALM (application life-cycle management), said Dave Mendlen, a director of product management in Microsoft&amp;#8217;s Developer Division.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;However, Mendlen did not give an actual date for when the new technology would become available, except to say that its name implies something about the time frame of its availability.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="http://www.eweek.com/c/a/Application-Development/Microsoft-Announces-Visual-Studio-2010-and-NET-Framework-40/" href="http://www.eweek.com/c/a/Application-Development/Microsoft-Announces-Visual-Studio-2010-and-NET-Framework-40/"&gt;http://www.eweek.com/c/a/Application-Development/Microsoft-Announces-Visual-Studio-2010-and-NET-Framework-40/&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From &lt;a href="http://www.informationweek.com/news/windows/operatingsystems/showArticle.jhtml?articleID=210604432" target="_blank"&gt;InformationWeek&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;In Visual Studio 2010, Microsoft also will introduce a feature it likens to an airplane's black box. While running a test of an application, a &amp;quot;black box&amp;quot; records the state of the machine and the application. That way, a tester can look at a debug log running alongside a video replay of the application that was under test and dive into all layers of the computing stack to see where a bug might have occurred. &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Visual Studio Team System 2010 will include some pieces of Microsoft's &amp;quot;Oslo&amp;quot; modeling strategy, as first demonstrated at Microsoft's TechEd conference earlier this year. The Architecture Explorer will allow architects and developers to build, customize, and see an architectural diagram of an application and enforce architectural consistency on builds of a piece of software. The software will support the Object Management Group's Unified Modeling Language and domain-specific languages. &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;img src="http://i.cmpnet.com/infoweek/galleries/automated/130/msdnshot2_full.jpg" /&gt; &lt;/p&gt;    &lt;p&gt;&lt;img src="http://i.cmpnet.com/infoweek/galleries/automated/130/msdnshot_full.jpg" /&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;More screenshots from &lt;a href="http://weblog.infoworld.com/stratdev/archives/2008/09/a_sneak_peek_at.html" target="_blank"&gt;Martin Heller at InfoWorld&lt;/a&gt; (click to enlarge):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/ArchExplorerWithGraph_2.png" target="_blank"&gt;&lt;img height="510" src="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/ArchExplorerWithGraph_2.png" width="700" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/Sequence_ReverseEngineered.jpg" target="_blank"&gt;&lt;img height="588" src="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/Sequence_ReverseEngineered.jpg" width="800" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/Layer_WithValidationErrors.jpg" target="_blank"&gt;&lt;img height="588" src="http://weblog.infoworld.com/stratdev/WindowsLiveWriter/AsneakpeekatVisualStudio2010_E3E1/Layer_WithValidationErrors.jpg" width="800" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;More links:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/VisualStudio/Visual-Studio-Team-System-2010-Week-on-Channel-9/" target="_blank"&gt;Videos from Microsoft.&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.zdnet.com/microsoft/?p=1610" target="_blank"&gt;Mary-Jo Foley's blog&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://www.sdtimes.com/VISUAL_STUDIO_TEAM_SYSTEM_2010_FOCUSES_ON_APPLICATION_QUALITY/About_AGILEDEVELOPMENT_and_NET_and_TESTINGTROUBLESHOOTING_and_VISUALSTUDIO_and_MICROSOFT/32916" target="_blank"&gt;SD Times&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5014866945474360408?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5014866945474360408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5014866945474360408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5014866945474360408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5014866945474360408'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/09/visual-studio-2010net-40-roundup.html' title='Visual Studio 2010/.NET 4.0 Roundup'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-2588212448997150277</id><published>2008-09-29T14:14:00.001-04:00</published><updated>2008-09-29T14:14:55.759-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 2 Release Candidate Now Available</title><content type='html'>&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx" target="_blank"&gt;Scott Guthrie announces.&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;There are some breaking changes between Beta2 and this RC, and we want to make sure that existing sites can update to the final release quickly once the final release is out.&amp;#160; As such, you can only use the RC for development right now - you can't go live with the new APIs until the final release is shipped (which will be soon though).&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;You can download today's Silverlight Release Candidate and accompanying VS and Blend support for it &lt;/em&gt;&lt;a href="http://silverlight.net/GetStarted/sl2rc0.aspx"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;#160; Note that Expression Blend support for Silverlight 2 is now provided using Blend 2.0 SP1.&amp;#160; You will need to install Blend 2.0 before applying the SP1 service pack that adds Silverlight 2 support.&amp;#160; If you don't already have Blend 2.0 installed you can download a free trial of it &lt;/em&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5FF08106-B9F4-43CD-ABAD-4CC9D9C208D7&amp;amp;displaylang=en"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;The final release of Silverlight is not that far off now.&amp;#160; It has been a pretty amazing project that has come a long way in a pretty short amount of time.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-2588212448997150277?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/2588212448997150277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=2588212448997150277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588212448997150277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588212448997150277'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/09/silverlight-2-release-candidate-now.html' title='Silverlight 2 Release Candidate Now Available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7289780007302816719</id><published>2008-09-11T10:10:00.001-04:00</published><updated>2008-09-11T10:10:22.612-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Visual Studio 2008 SP1 Preparation Tool</title><content type='html'>&lt;p&gt;Microsoft has released a tool that will prepare your system for VS 2008 SP1. It's important to run it if you have installed any beta Visual Studio 2008 software since it went RTM.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A494B0E0-EB07-4FF1-A21C-A4663E456D9D"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=A494B0E0-EB07-4FF1-A21C-A4663E456D9D&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a name="Description"&gt;&lt;/a&gt;The following pre-release programs and updates will prevent Visual Studio 2008 SP1 from installing successfully, so they must be removed prior to installation:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft Silverlight Tools Beta 1 &lt;/li&gt;    &lt;li&gt;Microsoft Visual Studio 2008 - KB949325 &lt;/li&gt;    &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/944899"&gt;Microsoft Visual Studio 2008 - KB944899 (v1)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx"&gt;Microsoft Visual Studio 2008 - KB945140 (SP1 Beta)&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;br /&gt;To remove these programs, it is recommended that you run the automated &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A494B0E0-EB07-4FF1-A21C-A4663E456D9D" target="_blank"&gt;Visual Studio 2008 Service Pack Preparation Tool&lt;/a&gt;. This tool will remove the specified updates and programs from your system and restore the integrity of any Visual Studio 2008 features that may have been compromised during manual removal of the Visual Studio 2008 SP1 Beta release.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7289780007302816719?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7289780007302816719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7289780007302816719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7289780007302816719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7289780007302816719'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/09/visual-studio-2008-sp1-preparation-tool.html' title='Visual Studio 2008 SP1 Preparation Tool'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8655502673036678481</id><published>2008-08-25T14:55:00.001-04:00</published><updated>2008-08-26T12:06:29.724-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NHibernate'/><title type='text'>NHibernate 2.0 has been released</title><content type='html'>&lt;p&gt;&lt;a href="http://www.hibernate.org/343.html" target="_blank"&gt;NHibernate&lt;/a&gt; is a port of the Java &lt;a href="http://www.hibernate.org/1.html" target="_blank"&gt;Hibernate&lt;/a&gt; ORM (&lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping" target="_blank"&gt;Object-Relational Mapper&lt;/a&gt;) and has the feature set of Hibernate 3.2.&lt;/p&gt;  &lt;p&gt;If you are looking for docs or tutorials, try Fabio's wiki: &lt;a href="http://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21"&gt;http://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Download here: &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;amp;package_id=73969"&gt;SourceForge.net: Files&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8655502673036678481?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8655502673036678481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8655502673036678481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8655502673036678481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8655502673036678481'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/08/nhibernate-20-has-been-released.html' title='NHibernate 2.0 has been released'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8972244002850335385</id><published>2008-08-12T13:00:00.001-04:00</published><updated>2008-08-12T13:00:38.576-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL Server 2008 released</title><content type='html'>&lt;p&gt;Microsoft has released &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/overview.aspx" target="_blank"&gt;SQL Server 2008&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Evaluation download available &lt;a href="http://msdn.microsoft.com/en-us/evalcenter/bb851668.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Hardware and Software requirements are &lt;a href="http://msdn.microsoft.com/en-us/library/ms143506.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Note that if you have Visual Studio 2008 installed, you will need to &lt;a href="http://support.microsoft.com/kb/956139" target="_blank"&gt;upgrade to Visual Studio 2008 SP1 before installing SQL Server 2008&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8972244002850335385?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8972244002850335385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8972244002850335385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8972244002850335385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8972244002850335385'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/08/sql-server-2008-released.html' title='SQL Server 2008 released'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4938889472339242761</id><published>2008-08-12T09:21:00.001-04:00</published><updated>2008-08-12T09:21:00.151-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Web Services Security Guide for WCF</title><content type='html'>&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/practices/default.aspx" target="_blank"&gt;Microsoft Patterns and Practices&lt;/a&gt; has released the &lt;a href="http://www.codeplex.com/WCFSecurityGuide" target="_blank"&gt;WCF security guide&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;Parts &lt;/h4&gt;  &lt;p&gt;Part I, &amp;quot;Security Fundamentals for Web Services&amp;quot;    &lt;br /&gt;Part II, &amp;quot;Fundamentals of WCF Security&amp;quot;     &lt;br /&gt;Part III, &amp;quot;Intranet Application Scenarios&amp;quot;     &lt;br /&gt;Part IV, &amp;quot;Internet Application Scenarios&amp;quot;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4938889472339242761?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4938889472339242761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4938889472339242761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4938889472339242761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4938889472339242761'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/08/web-services-security-guide-for-wcf.html' title='Web Services Security Guide for WCF'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8326833241503304795</id><published>2008-08-11T14:24:00.001-04:00</published><updated>2008-08-11T14:24:35.968-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Visual Studio 2008 Service Pack 1 available</title><content type='html'>&lt;p&gt;VS 2008 SP1 is now available for download with the .NET 3.5 SP1 framework.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank"&gt;More info here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Visual Studio 2008 SP1 delivers: &lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Improved WPF designers &lt;/li&gt;    &lt;li&gt;SQL Server 2008 support &lt;/li&gt;    &lt;li&gt;ADO.NET Entity Designer &lt;/li&gt;    &lt;li&gt;Visual Basic and Visual C++ components and tools (including an MFC-based Office 2007 style &amp;#8216;Ribbon&amp;#8217;) &lt;/li&gt;    &lt;li&gt;Visual Studio Team System Team Foundation Server (TFS) addresses customer feedback on version control usability and performance, email integration with work item tracking and full support for hosting on SQL Server 2008 &lt;/li&gt;    &lt;li&gt;Richer JavaScript support, enhanced AJAX and data tools, and Web site deployment improvements &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;The .NET Framework 3.5 SP1 delivers:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Performance increases between 20-45% for WPF-based applications &amp;#8211; without having to change any code &lt;/li&gt;    &lt;li&gt;WCF improvements that give developers more control over the way they access data and services &lt;/li&gt;    &lt;li&gt;Streamlined installation experience for client applications &lt;/li&gt;    &lt;li&gt;Improvements in the area of data platform, such as the ADO.NET Entity Framework, ADO.NET Data Services and support for SQL Server 2008&amp;#8217;s new features. &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8326833241503304795?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8326833241503304795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8326833241503304795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8326833241503304795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8326833241503304795'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/08/visual-studio-2008-service-pack-1.html' title='Visual Studio 2008 Service Pack 1 available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4829373392779149902</id><published>2008-08-10T22:21:00.003-04:00</published><updated>2009-03-24T14:19:44.087-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Patterns and Practices'/><title type='text'>Unity 1.2 will support Interception</title><content type='html'>&lt;p&gt;Grigori blogs about it: &lt;a title="http://blogs.msdn.com/agile/archive/2008/08/03/entlib4-1-kickoff.aspx" href="http://blogs.msdn.com/agile/archive/2008/08/03/entlib4-1-kickoff.aspx"&gt;http://blogs.msdn.com/agile/archive/2008/08/03/entlib4-1-kickoff.aspx&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4829373392779149902?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4829373392779149902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4829373392779149902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4829373392779149902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4829373392779149902'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/08/unity-12-will-support-interception.html' title='Unity 1.2 will support Interception'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7416524548747310436</id><published>2008-07-12T18:25:00.002-04:00</published><updated>2009-03-24T14:20:07.106-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Ninject'/><title type='text'>Ninject revisited</title><content type='html'>&lt;p&gt;&lt;a href="http://initializecomponent.blogspot.com/2008/07/looking-at-ninject.html" target="_blank"&gt;In a previous post&lt;/a&gt;, I looked at Ninject, and based on a cursory look at the documentation, dismissed it as requiring me to decorate my component classes with attributes in order to use multi-parameter constructor injection. &lt;a href="http://initializecomponent.blogspot.com/2008/07/looking-at-ninject.html?showComment=1215214860000#c1791306184860730770" target="_blank"&gt;Thanks to a comment&lt;/a&gt; by ninject's author, &lt;a href="http://kohari.org/" target="_blank"&gt;Nate Kohari&lt;/a&gt;, I found that &lt;a href="http://kohari.org/2008/06/08/attributes-we-dont-need-no-stinkin-attributes/" target="_blank"&gt;with a slight configuration change&lt;/a&gt;, we can duplicate the behavior of Unity.&lt;/p&gt;  &lt;p&gt;The proof's in the pudding. Let's see if we can wire up the same components with both Unity and Ninject without having to make any changes to our component classes.&lt;/p&gt;  &lt;p&gt;Here are some interfaces:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IDataService&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ISecurityService&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ILogger&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And here are some components that use them. The Business Logic requires all three, the Security service needs a DataService and Logger, and the DataService needs a Logger.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;BusinessLogic&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IDataService &lt;/span&gt;DataService { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;Logger { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ISecurityService &lt;/span&gt;SecurityService { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;BusinessLogic()&lt;br /&gt;   {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;BusinessLogic(&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;logger, &lt;span style="color:#2b91af;"&gt;IDataService &lt;/span&gt;dataService, &lt;span style="color:#2b91af;"&gt;ISecurityService &lt;/span&gt;securityService)&lt;br /&gt;       :&lt;span style="color:blue;"&gt;this&lt;/span&gt;()&lt;br /&gt;   {&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Logger = logger;&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.DataService = dataService;&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.SecurityService = securityService;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public override string &lt;/span&gt;ToString()&lt;br /&gt;   {&lt;br /&gt;       &lt;span style="color:blue;"&gt;return base&lt;/span&gt;.ToString() + &lt;span style="color:#a31515;"&gt;'\n' &lt;/span&gt;+&lt;br /&gt;           Logger.ToString() + &lt;span style="color:#a31515;"&gt;'\n' &lt;/span&gt;+&lt;br /&gt;           DataService.ToString() + &lt;span style="color:#a31515;"&gt;'\n' &lt;/span&gt;+&lt;br /&gt;           SecurityService.ToString() + &lt;span style="color:#a31515;"&gt;'\n'&lt;br /&gt;           &lt;/span&gt;;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;DataService &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;IDataService&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;Logger { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;DataService()&lt;br /&gt;   {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;DataService(&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;logger)&lt;br /&gt;       :&lt;span style="color:blue;"&gt;this&lt;/span&gt;()&lt;br /&gt;   {&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Logger = logger;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SecurityService &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;ISecurityService&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IDataService &lt;/span&gt;DataService { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;   &lt;span style="color:blue;"&gt;protected &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;Logger { &lt;span style="color:blue;"&gt;set&lt;/span&gt;; &lt;span style="color:blue;"&gt;get&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;SecurityService()&lt;br /&gt;   {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public &lt;/span&gt;SecurityService(&lt;span style="color:#2b91af;"&gt;ILogger &lt;/span&gt;logger, &lt;span style="color:#2b91af;"&gt;IDataService &lt;/span&gt;dataService)&lt;br /&gt;       : &lt;span style="color:blue;"&gt;this&lt;/span&gt;()&lt;br /&gt;   {&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Logger = logger;&lt;br /&gt;       &lt;span style="color:blue;"&gt;this&lt;/span&gt;.DataService = dataService;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Logger &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;ILogger&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If we don't want to use an auto-wring container, we need to know all the dependecies and create the Business object like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;static &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;BusinessLogic &lt;/span&gt;NormalWay()&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color:blue;"&gt;var &lt;/span&gt;logger = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Logger&lt;/span&gt;();&lt;br /&gt;   &lt;span style="color:blue;"&gt;var &lt;/span&gt;dataService = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;DataService&lt;/span&gt;(logger);&lt;br /&gt;   &lt;span style="color:blue;"&gt;var &lt;/span&gt;securityService = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SecurityService&lt;/span&gt;(logger, dataService);&lt;br /&gt;   &lt;span style="color:blue;"&gt;var &lt;/span&gt;bizLogic = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;BusinessLogic&lt;/span&gt;(logger, dataService, securityService);&lt;br /&gt;   &lt;span style="color:blue;"&gt;return &lt;/span&gt;bizLogic;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;How do we configure and create a BusinessLogic object with Unity? Like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;static &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;BusinessLogic &lt;/span&gt;UnityWay(&lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;container)&lt;br /&gt;{&lt;br /&gt;       &lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;container = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;UnityContainer&lt;/span&gt;();&lt;br /&gt;       container&lt;br /&gt;           .RegisterType&amp;lt;&lt;span style="color:#2b91af;"&gt;ILogger&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;Logger&lt;/span&gt;&amp;gt;()&lt;br /&gt;           .RegisterType&amp;lt;&lt;span style="color:#2b91af;"&gt;IDataService&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;DataService&lt;/span&gt;&amp;gt;()&lt;br /&gt;           .RegisterType&amp;lt;&lt;span style="color:#2b91af;"&gt;ISecurityService&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;SecurityService&lt;/span&gt;&amp;gt;()&lt;br /&gt;           ;&lt;br /&gt;       &lt;span style="color:blue;"&gt;var &lt;/span&gt;bizLogic = container.Resolve&amp;lt;&lt;span style="color:#2b91af;"&gt;BusinessLogic&lt;/span&gt;&amp;gt;();&lt;br /&gt;       &lt;span style="color:blue;"&gt;return &lt;/span&gt;bizLogic;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Likewise, we can create a method to create a BusinessLogic object using Ninject, all auto-wired are ready to go. This however, requires a configuration class (MyModule):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;static &lt;/span&gt;BusinessLogic NinjectWay()&lt;br /&gt;{&lt;br /&gt;   var kernel = &lt;span style="color:blue;"&gt;new &lt;/span&gt;StandardKernel(&lt;span style="color:blue;"&gt;new &lt;/span&gt;MyModule(), &lt;span style="color:blue;"&gt;new &lt;/span&gt;AutoWiringModule());&lt;br /&gt;   var bizLogic = kernel.Get&amp;lt;BusinessLogic&amp;gt;();&lt;br /&gt;   &lt;span style="color:blue;"&gt;return &lt;/span&gt;bizLogic;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:blue;"&gt;private class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MyModule &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;StandardModule&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color:blue;"&gt;public override void &lt;/span&gt;Load()&lt;br /&gt;   {&lt;br /&gt;       Bind&amp;lt;ILogger&amp;gt;().To&amp;lt;Logger&amp;gt;();&lt;br /&gt;       Bind&amp;lt;IDataService&amp;gt;().To&amp;lt;DataService&amp;gt;();&lt;br /&gt;       Bind&amp;lt;ISecurityService&amp;gt;().To&amp;lt;SecurityService&amp;gt;();&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We can run the following to show that the objects get create and populate the services:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;static void &lt;/span&gt;Main(&lt;span style="color:blue;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color:#2b91af;"&gt;BusinessLogic &lt;/span&gt;bz;&lt;br /&gt;&lt;br /&gt;   bz = NormalWay();&lt;br /&gt;   System.&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(bz);&lt;br /&gt;&lt;br /&gt;   bz = UnityWay();&lt;br /&gt;   System.&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(bz);&lt;br /&gt;&lt;br /&gt;   bz = NinjectWay();&lt;br /&gt;   System.&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(bz);&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;So the end result is that we can design our components and use constructor-injection. So long as we keep container-dependencies out of our business components, an app can be assembled using the container of your choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7416524548747310436?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7416524548747310436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7416524548747310436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7416524548747310436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7416524548747310436'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/07/ninject-revisited.html' title='Ninject revisited'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-467475264699960598</id><published>2008-07-03T22:17:00.001-04:00</published><updated>2008-07-03T22:17:24.282-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Ninject'/><title type='text'>Looking at Ninject</title><content type='html'>&lt;p&gt;Not to be too Microsoft-centric, I decided to look at the DI container &lt;a href="http://ninject.org/" target="_blank"&gt;Ninject&lt;/a&gt;, which has recently been &lt;a href="http://kohari.org/2008/06/16/ninject-10-goes-gold/" target="_blank"&gt;released&lt;/a&gt; by &lt;a href="http://kohari.org/" target="_blank"&gt;Nate Kohari&lt;/a&gt;. After all, if we write our components correctly (&lt;a href="http://devpinoy.org/blogs/cruizer/archive/2006/09/01/POCO-_2800_Plain-Old-CLR-Objects_2900_.aspx" target="_blank"&gt;POCOs&lt;/a&gt;), then swapping out containers should be a trivial exercise.&lt;/p&gt;  &lt;p&gt;I looked at the docs on Ninject's &lt;a href="http://dojo.ninject.org/wiki/display/NINJECT/Injection+Patterns" target="_blank"&gt;constructor injection&lt;/a&gt; and found the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;You also have the option to leave off the &lt;tt&gt;[Inject]&lt;/tt&gt; attribute completely. This can help if you don't have access to the source code of a class, but you still want to inject dependencies into it. Here's the logic Ninject follows to choose which constructor to call, if none have an &lt;tt&gt;[Inject]&lt;/tt&gt; attribute:&lt;/font&gt;&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;&lt;font color="#0000ff"&gt;If the type only has a single constructor, Ninject will call it. &lt;/font&gt;&lt;/li&gt;      &lt;li&gt;&lt;font color="#0000ff"&gt;If the type has more than one constructor, but has a default (parameterless) constructor available, Ninject will call it. (This also applies to types that have no explicit constructors defined.) &lt;/font&gt;&lt;/li&gt;   &lt;/ol&gt; &lt;/blockquote&gt;  &lt;p&gt;I think that's a deal-breaker. Adding Attributes to my classes is not an option, because I want to maintain container-independency. In order to work correctly with constructor-injection, I need the container to call the container with as many parameters as it can satisfy. I will often have a parameterless constructor in my component to supply default values for the object for legacy code which is not using a container.&lt;/p&gt;  &lt;p&gt;I'll take another look at Ninject if the constructor-injection strategy changes. The site has really sweet icons, by the way. Here's a sample:&lt;/p&gt; &lt;img src="http://ninject.org/assets/images/buttons/report-bugs.png" /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-467475264699960598?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/467475264699960598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=467475264699960598' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/467475264699960598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/467475264699960598'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/07/looking-at-ninject.html' title='Looking at Ninject'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3136036628053392482</id><published>2008-07-03T11:55:00.001-04:00</published><updated>2008-07-03T13:54:15.121-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Fun with C# 3.0 (#3) - Lambda expressions</title><content type='html'>&lt;p&gt;The addition of LINQ to C#/.NET has really improved the way that we can handle data in our applications. Here's an example.&lt;/p&gt;  &lt;p&gt;Suppose we want to write a method to count the number of strings in a list which exceed a certain length. It's not to hard to do with C# 2.0; you iterate over the items, make the comparison, increment a counter and return it. But C# 3.0 makes it simple.&lt;/p&gt;  &lt;p&gt;When the namespace &lt;a href="http://crawlmsdn.microsoft.com/en-us/library/system.linq.aspx" target="_blank"&gt;System.Linq&lt;/a&gt; is included in your file, &lt;strong&gt;IEnumerable&lt;/strong&gt; objects get a load of &lt;a href="http://crawlmsdn.microsoft.com/en-us/library/bb337580.aspx" target="_blank"&gt;new extension methods&lt;/a&gt;. One of them is &lt;a href="http://crawlmsdn.microsoft.com/en-us/library/bb919081.aspx" target="_blank"&gt;Where&lt;/a&gt;, which will return a sub-collection of items that match a filter. The filter is defined as a &lt;a href="http://crawlmsdn.microsoft.com/en-us/library/bb397687.aspx" target="_blank"&gt;lambda expression&lt;/a&gt; that returns a bool. If the item causes the lambda expression to evaluate to true, then the item will be included in the sub-collection. Let's look at some code:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public int &lt;/span&gt;NumberLongerThan(&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; list, &lt;span style="color: blue"&gt;int &lt;/span&gt;n)&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color: blue"&gt;var &lt;/span&gt;subList = list.Where(&lt;br /&gt;        (&lt;span style="color: blue"&gt;string &lt;/span&gt;str) =&amp;gt; str.Length &amp;gt; n&lt;br /&gt;   );&lt;br /&gt;   &lt;span style="color: blue"&gt;return &lt;/span&gt;subList.Count();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here we pass in a List&amp;lt;string&amp;gt; and a number. The subList will have the string items that are longer than n characters. Note that we don't have to define the type of subList; the compiler can infer it at compile-time.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is the code that uses the method.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; list = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #a31515"&gt;&amp;quot;abc&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;def&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;GH&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;ijKL&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;mnop&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;QRSTUV&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;Wxyz&amp;quot; &lt;/span&gt;};&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(NumberLongerThan(list, 0));&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(NumberLongerThan(list, 1));&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(NumberLongerThan(list, 2));&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(NumberLongerThan(list, 3));&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is the lambda expression:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;str) =&amp;gt; str.Length &amp;gt; n&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It states that a string is passed in and returns a bool based on the test of the string Length. The Where() method takes an expression that expects a string and returns a bool. Since the compiler knows this, we can let it infer the type of the parameter and specify the expression like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;str =&amp;gt; str.Length &amp;gt; n&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Also, note that if we have a named method that is of the correct delegate type (Func&amp;lt;T, bool&amp;gt;), we can pass it to Where(). Here, List&amp;lt;T&amp;gt; is List&amp;lt;string&amp;gt;, so the method must take a string parameter.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public bool &lt;/span&gt;TestString(&lt;span style="color: blue"&gt;string &lt;/span&gt;s) { &lt;span style="color: blue"&gt;return &lt;/span&gt;s.Length &amp;gt; 3; }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt; filtered = list.Where(TestString);&lt;br /&gt;//-- or --&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: blue"&gt;bool&lt;/span&gt;&amp;gt; f = TestString;&lt;br /&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;list2 = list.Where(f);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The advantage of using the unnamed lambda expression is that we can reference the local variable n as a parameter in our test expression.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;More info at &lt;a href="http://blogs.msdn.com/charlie/archive/2008/06/28/lambdas.aspx" target="_blank"&gt;Charlie Calvert's blog&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3136036628053392482?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3136036628053392482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3136036628053392482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3136036628053392482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3136036628053392482'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/07/fun-with-c-30-3-lambda-expressions.html' title='Fun with C# 3.0 (#3) - Lambda expressions'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-2588074674721136514</id><published>2008-07-01T21:38:00.001-04:00</published><updated>2008-07-01T21:38:14.718-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Making Your Resource Classes Public</title><content type='html'>&lt;p&gt;I recently posted on &lt;a href="http://initializecomponent.blogspot.com/2008/06/stupid-net-tricks-1.html" target="_blank"&gt;how to reference your Resources from a test assembly using the InternalsVisibleTo attribute&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The problem is that Visual Studio 2005 creates the Resource class with the internal access modifier. It turns out that this is &lt;a href="http://www.dev102.com/net/how-to-generate-public-classes-for-resource-files/" target="_blank"&gt;configurable in Visual Studio 2008&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-2588074674721136514?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/2588074674721136514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=2588074674721136514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588074674721136514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/2588074674721136514'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/07/making-your-resource-classes-public.html' title='Making Your Resource Classes Public'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-931857112106791667</id><published>2008-07-01T21:31:00.001-04:00</published><updated>2008-07-01T21:31:20.026-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>New Series on WCF</title><content type='html'>&lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/rojacobs/" target="_blank"&gt;Ron Jacobs&lt;/a&gt; has started a video series on WCF - The Total Noobs Guide to WCF.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/rojacobs/endpointtv-The-Total-Noobs-Guide-to-WCF-Lesson-1-My-First-WCF-Service" target="_blank"&gt;Lesson 1: My First WCF Service&lt;/a&gt; (16:21)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-931857112106791667?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/931857112106791667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=931857112106791667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/931857112106791667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/931857112106791667'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/07/new-series-on-wcf.html' title='New Series on WCF'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4007987764357445073</id><published>2008-06-28T11:47:00.001-04:00</published><updated>2008-06-28T11:47:23.965-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF Security Guide</title><content type='html'>&lt;p&gt;The &lt;a href="http://www.codeplex.com/WCFSecurityGuide/Release/ProjectReleases.aspx?ReleaseId=14781" target="_blank"&gt;2nd beta of the WCF Security Guide&lt;/a&gt; has been released by the Microsoft patterns and practices group.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4007987764357445073?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4007987764357445073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4007987764357445073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4007987764357445073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4007987764357445073'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/wcf-security-guide.html' title='WCF Security Guide'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5142691946874637759</id><published>2008-06-27T22:57:00.001-04:00</published><updated>2008-06-27T22:57:53.458-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>Nice series on Separation of Concerns by bogardj</title><content type='html'>&lt;p&gt;&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/" target="_blank"&gt;Jimmy Bogard&lt;/a&gt; has written a great series of blog posts showing how to refactor some Data Access code to make it more readable, testable and maintainable. The offending (offensive?) code was found in ASP.NET Pro magazine and had static references that precluded doing any unit testing. Jimmy shows how to separate out those dependencies.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/17/separation-of-concerns-how-not-to-do-it.aspx"&gt;Separation of Concerns - how not to do it&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/19/separation-of-concerns-by-example-part-1.aspx"&gt;Separation of Concerns by example: Part 1&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/24/separation-of-concerns-by-example-part-2.aspx"&gt;Separation of Concerns by example: Part 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/26/separation-of-concerns-by-example-part-3.aspx"&gt;Separation of Concerns by example: Part 3&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5142691946874637759?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5142691946874637759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5142691946874637759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5142691946874637759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5142691946874637759'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/nice-series-on-separating-of-concerns.html' title='Nice series on Separation of Concerns by bogardj'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-1936016478297840985</id><published>2008-06-24T18:31:00.000-04:00</published><updated>2008-06-24T18:39:02.039-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><title type='text'>Fun with C# 3.0 (#2)</title><content type='html'>&lt;p&gt;This one is a quickie. &lt;a href="http://msdn.microsoft.com/en-us/library/bb384054.aspx" target="_blank"&gt;Auto-implemented properties&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It allows you specify the property and have the compiler automatically define a backing private instance member. It is way cool.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Employee&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Name { &lt;span style="color: blue"&gt;set&lt;/span&gt;; &lt;span style="color: blue"&gt;get&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;Job { &lt;span style="color: blue"&gt;set&lt;/span&gt;; &lt;span style="color: blue"&gt;get&lt;/span&gt;; }&lt;br /&gt;    &lt;span style="color: blue"&gt;public int &lt;/span&gt;Age { &lt;span style="color: blue"&gt;set&lt;/span&gt;; &lt;span style="color: blue"&gt;get&lt;/span&gt;; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-1936016478297840985?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/1936016478297840985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=1936016478297840985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1936016478297840985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/1936016478297840985'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/fun-with-c-30-2.html' title='Fun with C# 3.0 (#2)'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5547412587164671342</id><published>2008-06-24T13:47:00.001-04:00</published><updated>2008-06-24T13:55:14.219-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='C# 3.0'/><title type='text'>Fun with C# 3.0 (#1)</title><content type='html'>&lt;p&gt;This is the first in a series of posts in which I explore new features of C# 3.0 available in Visual Studio 2008. &lt;/p&gt;  &lt;p&gt;In this post, I introduce &lt;a href="http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c11551/" target="_blank"&gt;anonymous types&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/dwahlin/archive/2008/01/25/c-3-0-features-extension-methods.aspx" target="_blank"&gt;extension methods&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;An anonymous type is an unnamed class that you can define simply by specifying the values of its properties. These properties are read-only and can be accessed through the usual property accessor syntax.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;employee = &lt;span style="color: blue"&gt;new &lt;/span&gt;{ Name = &lt;span style="color: #a31515"&gt;&amp;quot;John Smith&amp;quot;&lt;/span&gt;, Age = 44, Job = &lt;span style="color: #a31515"&gt;&amp;quot;Manager&amp;quot; &lt;/span&gt;};&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(employee.Name);&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(employee.Age);&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(employee.Job);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;ProcessData(employee);&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The class is created at compile-time and the properties are available via IntelliSense. Note, however that if you want to pass the object to another method, it must be passed as an object, since the class is unnamed.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;ProcessData(&lt;span style="color: blue"&gt;object &lt;/span&gt;data) &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once we have the object in our ProcessData method, we need to access the properties via Reflection. Here's where extension methods come in handy. An extension method is a method that is declared as a static method in static class and is in an accessible namespace. It will appear to add new methods to an object type. For example, I can add a method to the String class that removes spaces:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Extend&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public static string &lt;/span&gt;RemoveSpaces(&lt;span style="color: blue"&gt;this string &lt;/span&gt;s)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;s.Replace(&lt;span style="color: #a31515"&gt;&amp;quot; &amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  &lt;br /&gt;The &amp;quot;this&amp;quot; parameter modifier indicates that it is an extension method and the type of the parameter (string) is the class that is modified. It is called like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(employee.Name.RemoveSpaces());&lt;/pre&gt;&lt;br /&gt;To ease the access to our anonymous type properties, we can create an extension method on the object class. The method will be called ValueOf() and will take the name of the property as a parameter: &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ReflectionExtensions&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;public static object ValueOf&lt;/span&gt;(this object obj, &lt;span style="color: blue"&gt;string &lt;/span&gt;name)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(name == &lt;span style="color: blue"&gt;null&lt;/span&gt;) &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Property Name&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;try&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;obj.GetType().GetProperty(name).GetValue(obj, &lt;span style="color: blue"&gt;null&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;catch &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;NullReferenceException&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return null&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now in our ProcessData() method we can access the Property values: &lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;ProcessData(&lt;span style="color: blue"&gt;object &lt;/span&gt;data)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Employee Name = &amp;quot; &lt;/span&gt;+ data.ValueOf(&lt;span style="color: #a31515"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;));&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Employee Age = &amp;quot; &lt;/span&gt;+ data.ValueOf(&lt;span style="color: #a31515"&gt;&amp;quot;Age&amp;quot;&lt;/span&gt;));&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;Employee Job = &amp;quot; &lt;/span&gt;+ data.ValueOf(&lt;span style="color: #a31515"&gt;&amp;quot;Job&amp;quot;&lt;/span&gt;));&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5547412587164671342?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5547412587164671342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5547412587164671342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5547412587164671342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5547412587164671342'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/fun-with-c-30-1.html' title='Fun with C# 3.0 (#1)'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5164988246038369882</id><published>2008-06-18T10:08:00.002-04:00</published><updated>2008-06-19T04:50:35.956-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>Configuring and Supplying a Factory with Unity</title><content type='html'>&lt;p&gt;Here is a code-sample which allows the Factory to be Container-dependent, and thus configurable in the container setup code. Notice that I registered the unity instance with itself. If you do not do this, when the Factory is created, Unity will see that a UnityContainer is needed by the constructor and instantiate a new UnityContainer, which will not have the correct configuration. If you have registered the configured unity instance, then it will be supplied to the Factory. Also note that the unity configuration can be changed by other parts of the application, so if you want to avoid that, you might want to make a copy of the container inside the Factory constructor.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;&lt;br /&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;Microsoft.Practices.Unity;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;DI&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color:blue;"&gt;#region &lt;/span&gt;Container-independent&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;I &lt;/span&gt;{ }&lt;br /&gt;    &lt;span style="color:blue;"&gt;public interface &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;IFactory&lt;/span&gt;&amp;lt;T&amp;gt;&lt;br /&gt;    {&lt;br /&gt;        T Create();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;A &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;I&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Aprime &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;I&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;B&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color:#2b91af;"&gt;IFactory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;&amp;gt; Ifactory;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:blue;"&gt;public &lt;/span&gt;B(&lt;span style="color:#2b91af;"&gt;IFactory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;&amp;gt; f) { Ifactory = f; }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:blue;"&gt;public void &lt;/span&gt;SomeMethod()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color:#2b91af;"&gt;I &lt;/span&gt;a = Ifactory.Create();&lt;br /&gt;            &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(a.ToString());&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;#endregion&lt;br /&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;//--------------------------------------------------------------------------------&lt;br /&gt;    &lt;/span&gt;&lt;span style="color:blue;"&gt;#region &lt;/span&gt;Unity container Dependent&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Factory&lt;/span&gt;&amp;lt;T&amp;gt; : &lt;span style="color:#2b91af;"&gt;IFactory&lt;/span&gt;&amp;lt;T&amp;gt; &lt;span style="color:blue;"&gt;where &lt;/span&gt;T : &lt;span style="color:blue;"&gt;class&lt;br /&gt;    &lt;/span&gt;{  &lt;br /&gt;        &lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;container;&lt;br /&gt;        &lt;span style="color:blue;"&gt;public &lt;/span&gt;Factory(&lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;unity) { &lt;span style="color:blue;"&gt;this&lt;/span&gt;.container = unity; }&lt;br /&gt;        &lt;span style="color:blue;"&gt;public &lt;/span&gt;T Create() { &lt;span style="color:blue;"&gt;return &lt;/span&gt;container.Resolve&amp;lt;T&amp;gt;(); }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color:blue;"&gt;class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Program&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color:blue;"&gt;static void &lt;/span&gt;Main(&lt;span style="color:blue;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;unity = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;UnityContainer&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color:green;"&gt;// register the Unity container so that this instance is provided to factory&lt;br /&gt;            &lt;/span&gt;unity.RegisterInstance(unity);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color:green;"&gt;// tell Unity to provide A when asked for interface I&lt;br /&gt;            &lt;/span&gt;unity.RegisterType&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;A&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color:green;"&gt;// use the Unity enabled factory&lt;br /&gt;            &lt;/span&gt;unity.RegisterType(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;IFactory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;&amp;gt;), &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;Factory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;&amp;gt;));&lt;br /&gt;&lt;br /&gt;            &lt;span style="color:#2b91af;"&gt;B &lt;/span&gt;b = unity.Resolve&amp;lt;&lt;span style="color:#2b91af;"&gt;B&lt;/span&gt;&amp;gt;();&lt;br /&gt;            b.SomeMethod();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color:green;"&gt;// now tell Unity to provide Aprime when asked for I&lt;br /&gt;            &lt;/span&gt;unity.RegisterType&amp;lt;&lt;span style="color:#2b91af;"&gt;I&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;Aprime&lt;/span&gt;&amp;gt;();&lt;br /&gt;            b.SomeMethod();&lt;br /&gt;           &lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color:blue;"&gt;#endregion&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;See: &lt;a href="http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=29697"&gt;http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=29697&lt;/a&gt; for a discussion about this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5164988246038369882?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5164988246038369882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5164988246038369882' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5164988246038369882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5164988246038369882'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/configuring-and-supplying-factory-with.html' title='Configuring and Supplying a Factory with Unity'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-911665756188965329</id><published>2008-06-18T08:48:00.005-04:00</published><updated>2009-03-24T14:20:32.586-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><title type='text'>Container Dependency anti-pattern</title><content type='html'>&lt;p&gt;It is good design to &lt;a href="http://martinfowler.com/articles/injection.html" target="_blank"&gt;minimize the number of dependencies between components&lt;/a&gt; in a system. &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163739.aspx" target="_blank"&gt;Dependency Injection&lt;/a&gt; is used to decouple components from each other. A component should not specify, or require, a particular implementation of a Data Service, Logging Service or any other &lt;a href="http://www.informit.com/articles/article.aspx?p=375541" target="_blank"&gt;cross-cutting concern&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;One solution to this problem is to use a &lt;a href="http://blogs.msdn.com/agile/archive/2008/04/04/unity-di-container-1-0-shipped.aspx" target="_blank"&gt;DI container, such as Unity&lt;/a&gt;. This localizes all the dependencies in one place, the shell, or configuration point for your application. The components and services can be assembled and provided to the components as needed.&lt;/p&gt;&lt;p&gt;However, sometimes this leads to an anti-pattern in that components are built with a &lt;a href="http://www.picocontainer.org/container-dependency-antipattern.html" target="_blank"&gt;dependency on the container&lt;/a&gt;. This counteracts much of the advantage of using the container. It makes it difficult to share your components with another team that might be using a different container. &lt;strong&gt;Do not create container dependencies in your components!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The &lt;a href="http://www.picocontainer.org/container-dependency-antipattern.html" target="_blank"&gt;picocontainer example&lt;/a&gt; shows how to solve the problem with constructor injection, but assumes that the dependent container (B) only needs one instance of the A object. The question arises how can B create A objects on the fly as needed? &lt;/p&gt;&lt;p&gt;The solution is to inject a Factory into B via the constructor.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;&lt;br /&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;Microsoft.Practices.Unity;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;DI&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;A&lt;br /&gt;   &lt;/span&gt;{&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;B&lt;br /&gt;   &lt;/span&gt;{&lt;br /&gt;       &lt;span style="color:#2b91af;"&gt;Factory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;A&lt;/span&gt;&amp;gt; Afactory;&lt;br /&gt;&lt;br /&gt;       &lt;span style="color:blue;"&gt;public &lt;/span&gt;B(&lt;span style="color:#2b91af;"&gt;Factory&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;A&lt;/span&gt;&amp;gt; f) { Afactory = f; }&lt;br /&gt;&lt;br /&gt;       &lt;span style="color:blue;"&gt;public void &lt;/span&gt;SomeMethod()&lt;br /&gt;       {&lt;br /&gt;           &lt;span style="color:#2b91af;"&gt;A &lt;/span&gt;a = Afactory.Create();&lt;br /&gt;           &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(a.ToString());&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Factory&lt;/span&gt;&amp;lt;T&amp;gt; &lt;span style="color:blue;"&gt;where &lt;/span&gt;T : &lt;span style="color:blue;"&gt;new&lt;/span&gt;()&lt;br /&gt;   {&lt;br /&gt;       &lt;span style="color:blue;"&gt;public &lt;/span&gt;T Create() { &lt;span style="color:blue;"&gt;return new &lt;/span&gt;T(); }&lt;br /&gt;   }&lt;br /&gt;   &lt;span style="color:blue;"&gt;class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Program&lt;br /&gt;   &lt;/span&gt;{&lt;br /&gt;       &lt;span style="color:blue;"&gt;static void &lt;/span&gt;Main(&lt;span style="color:blue;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;       {&lt;br /&gt;           &lt;span style="color:#2b91af;"&gt;UnityContainer &lt;/span&gt;unity = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;UnityContainer&lt;/span&gt;();&lt;br /&gt;           &lt;span style="color:#2b91af;"&gt;B b&lt;/span&gt; = unity.Resolve&amp;lt;&lt;span style="color:#2b91af;"&gt;B&lt;/span&gt;&amp;gt;();&lt;br /&gt;           b.SomeMethod();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;If you want to have the factory use a specific container, that could be an acceptable dependency, since it would be a trivial change to write a new Factory class for a different container. I will post this later. &lt;/p&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;See: &lt;a href="http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=29697"&gt;http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=29697&lt;/a&gt; for a discussion about this.&lt;/p&gt;&lt;p&gt;UPDATE: See &lt;a href="http://initializecomponent.blogspot.com/2008/10/common-service-locator.html"&gt;http://initializecomponent.blogspot.com/2008/10/common-service-locator.html&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-911665756188965329?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/911665756188965329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=911665756188965329' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/911665756188965329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/911665756188965329'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/container-dependency-anti-pattern.html' title='Container Dependency anti-pattern'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3606287354049945162</id><published>2008-06-17T16:08:00.001-04:00</published><updated>2008-06-17T16:08:45.211-04:00</updated><title type='text'>Stupid .NET Tricks #1</title><content type='html'>&lt;p&gt;If you like to Unit Test as much as I do, and you're obsessive about putting your strings in Resources files, it can be kind of tricky to make use of these Resources in your Unit Tests.&lt;/p&gt;  &lt;p&gt;I'll show you what I mean. You want to unit test the following:&lt;/p&gt;  &lt;pre&gt;public string login(user, pw)&lt;br /&gt;{&lt;br /&gt;    if (!validUser(user, pw))&lt;br /&gt;    {&lt;br /&gt;        return &amp;quot;Invalid User&amp;quot;;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;OK, so we write a test: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public void TestInvalidUser()&lt;br /&gt;{&lt;br /&gt;    MyClass m = new MyClass();&lt;br /&gt;    Assert.AreEqual(&amp;quot;Invalid User&amp;quot;, m.login(&amp;quot;Me&amp;quot;,&amp;quot;X&amp;quot;));&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now I want to move the error message into the Resources class that Visual Studio generates for you when you use the String editor on the Project Properties dialog. Now we have: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public string login(user, pw)&lt;br /&gt;{&lt;br /&gt;    if (!validUser(user, pw))&lt;br /&gt;    {&lt;br /&gt;        return Properties.Resources.INVALID_USER;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;and &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public void TestInvalidUser()&lt;br /&gt;{&lt;br /&gt;    MyClass m = new MyClass();&lt;br /&gt;    Assert.AreEqual(Properties.Resources.ERROR_INVALID_USER, m.login(&amp;quot;Me&amp;quot;,&amp;quot;X&amp;quot;));&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The problem is that the Resources class that VS generates for you will have the &lt;strong&gt;internal&lt;/strong&gt; access modifier and will not be accessible to your test code (unless you include the test in the same assembly, which is sub-optimal). To the rescue comes the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" target="_blank"&gt;InternalsVisibleTo&lt;/a&gt; &lt;/strong&gt;attribute. Add it to your production class, specifying the Test assembly as a &lt;em&gt;friend &lt;/em&gt;and you code will compile. I've had mixed success getting Intellisense to recognize that it can access the other assembly, however. It doesn't stop it from compiling anyway. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(&amp;quot;AcmeCorp.ProjectX.Tests.TestSecurity&amp;quot;)]&lt;/pre&gt;&lt;br /&gt;Note, also, that if the production assembly is signed, then the test assembly will need to signed as well, and the public key of the friend assembly will need to be specified as part of the assembly name.   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3606287354049945162?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3606287354049945162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3606287354049945162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3606287354049945162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3606287354049945162'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/stupid-net-tricks-1.html' title='Stupid .NET Tricks #1'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6810890877533186875</id><published>2008-06-07T18:03:00.003-04:00</published><updated>2008-06-07T22:48:28.442-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight 2 Beta 2 available</title><content type='html'>Microsoft has released the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=50A9EC01-267B-4521-B7D7-C0DBA8866434&amp;amp;displaylang=en"&gt;Second Beta of Silverlight 2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/06/06/silverlight-2-beta2-released.aspx"&gt;Announcement on Scott Guthrie's blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The highlights:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;4.8 MB Download that does not require .NET Framework on the target system&lt;/li&gt;&lt;li&gt;The tools for VS 2008 will work with VS 2008 and VS 2008 SP1 beta&lt;/li&gt;&lt;li&gt;Adds more controls to beta 1&lt;/li&gt;&lt;li&gt;Cross-domain socket support&lt;/li&gt;&lt;li&gt;Background thread networking&lt;/li&gt;&lt;li&gt;Support for WCF duplex connections&lt;/li&gt;&lt;li&gt;Datagrid improvements&lt;/li&gt;&lt;li&gt;Databinding improvements&lt;/li&gt;&lt;li&gt;Isolated storage is now 1MB with ability to prompt user to increase storage space&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Note that if you want to use VS 2008 SP1 with SL 2 Beta 2, you should install VS 2008 SP1 beta first then the SL2B2 tools.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6810890877533186875?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6810890877533186875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6810890877533186875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6810890877533186875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6810890877533186875'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/silverlight-2-beta-2-available.html' title='Silverlight 2 Beta 2 available'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6411123291579863384</id><published>2008-06-05T10:33:00.009-04:00</published><updated>2008-06-05T11:11:03.576-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Unity, WCF and IIS</title><content type='html'>In a previous post, I showed &lt;a href="http://initializecomponent.blogspot.com/2008/06/integrating-unity-with-wcf.html"&gt;how to integrate Unity with WCF &lt;/a&gt;when you are &lt;a href="http://msdn.microsoft.com/en-us/library/ms731758.aspx"&gt;self-hosting a service&lt;/a&gt;. What's not clear is how to get IIS to use the Unity-enabled host when it starts hosting your service.&lt;br /&gt;&lt;br /&gt;This is accomplished with a ServiceHostFactory. The @ServiceHost directive has an attribute named, curiously enough, Factory. This can be used to designate a class which will provide a configured ServiceHost. More on that in a moment. Let's see an example of a service that needs constructor-injection.&lt;br /&gt;&lt;br /&gt;I've taken the default Service that Visual Studio 2008 gives you when you create a WCF Web Service, and added a SuffixProvider dependency that is satisfied in the constructor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;namespace WcfService1&lt;br /&gt;{&lt;br /&gt;    public class Service1 : IService1&lt;br /&gt;    {&lt;br /&gt;        private ISuffixProvider provider;&lt;br /&gt;        public Service1(ISuffixProvider provider)&lt;br /&gt;        {&lt;br /&gt;            this.provider = provider;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string GetData(int value)&lt;br /&gt;        {&lt;br /&gt;            return string.Format("You entered: {0}", value);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public CompositeType GetDataUsingDataContract(CompositeType composite)&lt;br /&gt;        {&lt;br /&gt;            if (composite.BoolValue)&lt;br /&gt;            {&lt;br /&gt;                composite.StringValue += provider.GetSuffix();&lt;br /&gt;            }&lt;br /&gt;            return composite;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;namespace WcfService1&lt;br /&gt;{&lt;br /&gt;    public interface ISuffixProvider&lt;br /&gt;    {&lt;br /&gt;        string GetSuffix();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace WcfService1&lt;br /&gt;{&lt;br /&gt;    public class MySuffixProvider : ISuffixProvider&lt;br /&gt;    {&lt;br /&gt;        #region ISuffixProvider Members&lt;br /&gt;&lt;br /&gt;        public string GetSuffix()&lt;br /&gt;        {&lt;br /&gt;            return "estericize";&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Using the UnityWCF project created in the previous post, I will create a factory that is derived from ServiceHostFactory, and configure a Unity container to supply a concrete implementation of ISuffixProvider. I have done this in code, most likely you will want to configure it from an XML file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.ServiceModel;&lt;br /&gt;using System.ServiceModel.Activation;&lt;br /&gt;using Microsoft.Practices.Unity;&lt;br /&gt;using UnityWCF;&lt;br /&gt;&lt;br /&gt;namespace WcfService1&lt;br /&gt;{&lt;br /&gt;    public class UnityServiceHostFactory : ServiceHostFactory&lt;br /&gt;    {&lt;br /&gt;        protected override ServiceHost CreateServiceHost(&lt;br /&gt;                                          Type serviceType, Uri[] baseAddresses)&lt;br /&gt;        {&lt;br /&gt;            UnityServiceHost host = new UnityServiceHost(serviceType, baseAddresses);&lt;br /&gt;            UnityContainer unity = new UnityContainer();&lt;br /&gt;            host.Container = unity;&lt;br /&gt;&lt;br /&gt;            //configure container&lt;br /&gt;            unity.RegisterType&amp;lt;ISuffixProvider,MySuffixProvider&amp;gt;();&lt;br /&gt;&lt;br /&gt;            return host;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally, edit the Service1.svc file to reference the factory class:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;%@ ServiceHost Language="C#" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Debug="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Factory="WcfService1.UnityServiceHostFactory" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Service="WcfService1.Service1" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CodeBehind="Service1.svc.cs" %&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6411123291579863384?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6411123291579863384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6411123291579863384' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6411123291579863384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6411123291579863384'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/unity-wcf-and-iis.html' title='Unity, WCF and IIS'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6082724437400704950</id><published>2008-06-05T10:28:00.003-04:00</published><updated>2008-06-05T13:29:28.671-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='AOP'/><title type='text'>Unity and Interception</title><content type='html'>&lt;a href="http://weblogs.asp.net/podwysocki/default.aspx"&gt;Matthew Podwysocki &lt;/a&gt;has a good &lt;a href="http://weblogs.asp.net/podwysocki/archive/2008/04/11/unity-community-contributions-and-interception.aspx"&gt;post &lt;/a&gt;on adding Interception capabilities to Unity via its extension model.&lt;br /&gt;&lt;br /&gt;His conclusion:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;As you can see, the extensibility model of Unity works in that we can add&lt;br /&gt;interception to Unity. So, we can start thinking about moving our cross&lt;br /&gt;cutting concerns to these layers should we so choose if Unity is your container&lt;br /&gt;of choice. There are plenty of containers out there to choose from, so&lt;br /&gt;it's best to give them all a try and pick one based upon features, programming&lt;br /&gt;style, and heck, maybe even licensing. &lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;UPDATE: It looks like the Interception Extensions that Matt mentions in his post only work with Unity 1.0. Hopefully someone will update them for Unity 1.1 soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6082724437400704950?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6082724437400704950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6082724437400704950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6082724437400704950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6082724437400704950'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/unity-and-interception.html' title='Unity and Interception'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4549424146620438923</id><published>2008-06-04T15:43:00.013-04:00</published><updated>2012-02-14T14:26:22.761-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Integrating Unity with WCF</title><content type='html'>&lt;i&gt;&lt;b&gt;Update (Feb 14, 2012): &lt;/b&gt;I fixed an issue in the code.&lt;/i&gt;&lt;br&gt;&lt;br /&gt;You might think Unity is great and all, but how can you use it with your WCF services? You might have a service that depends on a data access object, a security object and a logger. How do you get references to these objects into your services when WCF is instanciating your service for you?&lt;br /&gt;&lt;br /&gt;You could create static methods that locate and configure these services, like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MyLogger logger = MyLogger.getLogger();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MyDAO dao = MyDAO.getDao();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;MySecurity security = MySecurity.getSecurityObject();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We all know why that's bad (tightly coupled). We can't change the implementation of any of these objects, or do unit testing with mocks, without changing the code.&lt;br /&gt;&lt;br /&gt;With Unity, or any other DI container, we can configure the container and let it resolve the dependencies. Any object that is needs a reference to another object can have it injected through the constructor. All automatically. So how do we force WCF to use the Unity container to create a fully functional service instance for us with all the dependencies resolved? The key is through the magic of an InstanceProvider.&lt;br /&gt;&lt;br /&gt;Before I reveal how this is done, I want to show three use cases that we want to be able to solve, and allude to a fourth. These three use cases will be for self-hosted WCF services.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We have a configured Unity container, and want to create a ServiceHost that will use it.&lt;/li&gt;&lt;li&gt;We have a configured Unity container, and an existing ServiceHost instance needs to use it.&lt;/li&gt;&lt;li&gt;We have an existing ServiceHost instance and want to configure it with a new Unity configuration.&lt;/li&gt;&lt;/ol&gt;Here is what these use cases will look like in code:&lt;br /&gt;&lt;br /&gt;Case 1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Create new ServiceHost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;UnityServiceHost host = new UnityServiceHost(typeof(MyService));&lt;br /&gt;host.AddServiceEndpoint(typeof(IService), binding, address);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Set existing UnityContainer&lt;br /&gt;host.Container = unity;&lt;br /&gt;host.Open();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Case 2&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Create new ServiceBehavior&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;UnityServiceBehavior behavior = new UnityServiceBehavior();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Set existing UnityContainer&lt;br /&gt;behavior.InstanceProvider.Container = unity;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Add behavior to ServiceHost&lt;br /&gt;behavior.AddToHost(host);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;host.Open();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;br /&gt;Case 3&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;// let behavior create a new container&lt;br /&gt;UnityServiceBehavior = new UnityServiceBehavior();&lt;br /&gt;// configure new container&lt;br /&gt;behavior.InstanceProvider.Container.RegisterInstance&lt;ilogger&gt;(logger);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;behavior.InstanceProvider.Container.RegisterInstance(dao);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;behavior.InstanceProvider.Container.RegisterType&lt;isecurity&gt;(typeof(MySecurity));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// Add behavior to ServiceHost&lt;br /&gt;behavior.AddToHost(host);&lt;br /&gt;host.Open();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;br /&gt;The fourth use case is running as an IIS-hosted service, which I will leave for a future post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating an InstanceProvider&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;When WCF needs to create an instance of a service it invokes an instance provider. The default will create the appropriate type using the default constructor, but we can add a ServiceBehavior that will substitute our custom InstanceProvider. Our provider will be configured with a Unity container and call Resolve() when asked for a new Instance. &lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;using System;&lt;br /&gt;&lt;br /&gt;using System.ServiceModel;&lt;br /&gt;using System.ServiceModel.Channels;&lt;br /&gt;using System.ServiceModel.Dispatcher;&lt;br /&gt;&lt;br /&gt;using Microsoft.Practices.Unity;&lt;br /&gt;&lt;br /&gt;namespace UnityWCF&lt;br /&gt;{&lt;br /&gt;    public class UnityInstanceProvider : IInstanceProvider&lt;br /&gt;    {&lt;br /&gt;        public UnityContainer Container { set; get; }&lt;br /&gt;        public Type ServiceType { set; get; }&lt;br /&gt;&lt;br /&gt;        public UnityInstanceProvider() : this(null) {&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public UnityInstanceProvider(Type type)&lt;br /&gt;        {&lt;br /&gt;            ServiceType = type;&lt;br /&gt;            Container = new UnityContainer();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #region IInstanceProvider Members&lt;br /&gt;&lt;br /&gt;        public object GetInstance(&lt;br /&gt;          InstanceContext instanceContext, Message message)&lt;br /&gt;        {&lt;br /&gt;            return Container.Resolve(ServiceType);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public object GetInstance(&lt;br /&gt;          InstanceContext instanceContext)&lt;br /&gt;        {&lt;br /&gt;            return GetInstance(instanceContext, null);&lt;br /&gt;        }&lt;br /&gt;        public void ReleaseInstance(&lt;br /&gt;          InstanceContext instanceContext, object instance)&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;        #endregion&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Create the Service Behavior&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;The Service Behavior's ApplyDispatchBehavior method will be called before the service is instanciated. This is the point where we create and configure our InstanceProvider. The AddToHost method is used to add the behavior to the ServiceHost, ensuring that it is only added once.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;using System.ServiceModel;&lt;br /&gt;using System.ServiceModel.Channels;&lt;br /&gt;using System.ServiceModel.Description;&lt;br /&gt;using System.ServiceModel.Dispatcher;&lt;br /&gt;&lt;br /&gt;using Microsoft.Practices.Unity;&lt;br /&gt;using System.Collections.ObjectModel;&lt;br /&gt;&lt;br /&gt;namespace UnityWCF&lt;br /&gt;{&lt;br /&gt;    public class UnityServiceBehavior : IServiceBehavior&lt;br /&gt;    {&lt;br /&gt;        public UnityInstanceProvider InstanceProvider&lt;br /&gt;               { get; set; }&lt;br /&gt;&lt;br /&gt;        private ServiceHost serviceHost = null;&lt;br /&gt;&lt;br /&gt;        public UnityServiceBehavior()&lt;br /&gt;        {&lt;br /&gt;            InstanceProvider = new UnityInstanceProvider();&lt;br /&gt;        }&lt;br /&gt;        public UnityServiceBehavior(UnityContainer unity)&lt;br /&gt;        {&lt;br /&gt;            InstanceProvider = new UnityInstanceProvider();&lt;br /&gt;            InstanceProvider.Container = unity;&lt;br /&gt;        }&lt;br /&gt;        public void ApplyDispatchBehavior(&lt;br /&gt;          ServiceDescription serviceDescription,&lt;br /&gt;          ServiceHostBase serviceHostBase)&lt;br /&gt;        {&lt;br /&gt;            foreach (ChannelDispatcherBase cdb&lt;br /&gt;                 in serviceHostBase.ChannelDispatchers)&lt;br /&gt;            {&lt;br /&gt;                ChannelDispatcher cd&lt;br /&gt;                   = cdb as ChannelDispatcher;&lt;br /&gt;                if (cd != null)&lt;br /&gt;                {&lt;br /&gt;                    foreach (EndpointDispatcher ed&lt;br /&gt;                                    in cd.Endpoints)&lt;br /&gt;                    {&lt;br /&gt;                        InstanceProvider.ServiceType&lt;br /&gt;                             = serviceDescription.ServiceType;&lt;br /&gt;                        ed.DispatchRuntime.InstanceProvider&lt;br /&gt;                             = InstanceProvider;&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        public void AddBindingParameters(&lt;br /&gt;            ServiceDescription serviceDescription,&lt;br /&gt;            ServiceHostBase serviceHostBase,&lt;br /&gt;            Collection&amp;lt;ServiceEndpoint&amp;gt; endpoints,&lt;br /&gt;            BindingParameterCollection bindingParameters) { }&lt;br /&gt;&lt;br /&gt;        public void Validate(&lt;br /&gt;            ServiceDescription serviceDescription,&lt;br /&gt;            ServiceHostBase serviceHostBase) { }&lt;br /&gt;&lt;br /&gt;        public void AddToHost(ServiceHost host)&lt;br /&gt;        {&lt;br /&gt;            // only add to host once&lt;br /&gt;            if (serviceHost != null) return;&lt;br /&gt;            host.Description.Behaviors.Add(this);&lt;br /&gt;            serviceHost = host;&lt;br /&gt;        }&lt;br /&gt;     }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Creating the ServiceHost&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;The UnityServiceHost will encapsulate a UnityContainer and configure itself with the appropriate InstanceProvider and ServiceBehavior, so that the container will be used to Resolve instances when needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;using System;&lt;br /&gt;using System.ServiceModel;&lt;br /&gt;&lt;br /&gt;using Microsoft.Practices.Unity;&lt;br /&gt;&lt;br /&gt;namespace UnityWCF&lt;br /&gt;{&lt;br /&gt;    public class UnityServiceHost : ServiceHost&lt;br /&gt;    {&lt;br /&gt;        public UnityContainer Container { set; get; }&lt;br /&gt;&lt;br /&gt;        public UnityServiceHost()&lt;br /&gt;            : base()&lt;br /&gt;        {&lt;br /&gt;            Container = new UnityContainer();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public UnityServiceHost(&lt;br /&gt;            Type serviceType,&lt;br /&gt;            params Uri[] baseAddresses)&lt;br /&gt;            : base(serviceType, baseAddresses)&lt;br /&gt;        {&lt;br /&gt;            Container = new UnityContainer();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        protected override void OnOpening()&lt;br /&gt;        {&lt;br /&gt;            new UnityServiceBehavior(Container)&lt;br /&gt;                       .AddToHost(this);&lt;br /&gt;            base.OnOpening();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;I have to credit &lt;a href="http://orand.blogspot.com/"&gt;Oran Dennison &lt;/a&gt;who showed &lt;a href="http://orand.blogspot.com/2006/10/wcf-service-dependency-injection.html"&gt;how to integrate WCF and Spring.NET&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4549424146620438923?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4549424146620438923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4549424146620438923' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4549424146620438923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4549424146620438923'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/integrating-unity-with-wcf.html' title='Integrating Unity with WCF'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5229446239656960606</id><published>2008-06-04T15:23:00.006-04:00</published><updated>2008-06-05T23:40:48.431-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><title type='text'>More on the Unity Application Block</title><content type='html'>Microsoft has taken another stab at releasing a &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection &lt;/a&gt;container with the release of &lt;a href="http://www.codeplex.com/unity"&gt;Unity&lt;/a&gt;. Unity 1.1 has been bundled into the &lt;a href="http://www.codeplex.com/entlib"&gt;Enterprise Library 4.0&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Unity is basically a slimmed-down version of ObjectBuilder without the support for interceptors.&lt;br /&gt;&lt;br /&gt;Here's an &lt;a href="http://www.infoq.com/news/2008/04/microsoft-unity"&gt;interview &lt;/a&gt;with &lt;a href="http://www.tavaresstudios.com/Blog/"&gt;Chris Tavares&lt;/a&gt;, the lead developer of Unity.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;RB: There are quite a few DI containers already, what was the motivation by your team in creating Unity?&lt;br /&gt;&lt;br /&gt;CT: Patterns &amp;amp; practices has been giving guidance around dependency injection for a while now. CAB, Mobile client Software Factory, Smart Client Software Factory, Web Client Software Factory, and Enterprise Library have all used DI in various ways. That last word is the killer: “various”. Each project, although they were all build on ObjectBuilder, did DI differently and incompatibly. Having an explicit, fully featured container that we can use unencumbered allows us to provide better guidance around DI and container based architectures.&lt;br /&gt;&lt;br /&gt;There are other reasons as well. We have customers that will not touch open source software for whatever reason. Having a DI container from Microsoft makes them feel safer and lets them get the advantages. It also puts them in a good position to later switch containers if they wish.&lt;br /&gt;&lt;br /&gt;Another goal is to raise the profile of Dependency Injection both inside and outside of Microsoft. Having a container from Microsoft helps promote DI both to the general Microsoft .NET developer community and internal Microsoft developers as well. &lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;Interceptors would be a good addition to Unity. This would allow deployment-time configuration of cross-cutting concerns, such as logging, performance monitoring, exception handling and security.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5229446239656960606?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5229446239656960606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5229446239656960606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5229446239656960606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5229446239656960606'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/more-on-unity-application-block.html' title='More on the Unity Application Block'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4337539819187965868</id><published>2008-06-03T17:44:00.006-04:00</published><updated>2008-06-03T17:49:57.214-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Common WCF Security Scenarios</title><content type='html'>&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl01" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl01',this);" href="http://msdn.microsoft.com/en-us/library/ms733091.aspx"&gt;Internet Unsecured Client and Service&lt;/a&gt; &lt;/div&gt;&lt;div align="left"&gt;An example of a public, unsecured client and service.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl02" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl02',this);" href="http://msdn.microsoft.com/en-us/library/ms734784.aspx"&gt;Intranet Unsecured Client and Service&lt;/a&gt; &lt;/div&gt;&lt;div align="left"&gt;A basic Windows Communication Foundation (WCF) service developed to provide information on a secure private network to a WCF application.&lt;br /&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl03',this);" href="http://msdn.microsoft.com/en-us/library/ms733775.aspx"&gt;Transport Security with Basic Authentication&lt;/a&gt;&lt;br /&gt;The application allows clients to log on using custom authentication.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl04" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl04',this);" href="http://msdn.microsoft.com/en-us/library/ms733089.aspx"&gt;Transport Security with Windows Authentication&lt;/a&gt;&lt;br /&gt;Shows a client and service secured by Windows security.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl05" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl05',this);" href="http://msdn.microsoft.com/en-us/library/ms729789.aspx"&gt;Transport Security with an Anonymous Client&lt;/a&gt;&lt;br /&gt;This scenario uses transport security (such as HTTPS) to ensure confidentiality and integrity.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl06" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl06',this);" href="http://msdn.microsoft.com/en-us/library/ms731074.aspx"&gt;Transport Security with Certificate Authentication&lt;/a&gt;&lt;br /&gt;Shows a client and service secured by a certificate.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl07" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl07',this);" href="http://msdn.microsoft.com/en-us/library/ms733938.aspx"&gt;Message Security with an Anonymous Client&lt;/a&gt;&lt;br /&gt;Shows a client and service secured by WCF message security.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl08" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl08',this);" href="http://msdn.microsoft.com/en-us/library/ms731058.aspx"&gt;Message Security with a User Name Client&lt;/a&gt;&lt;br /&gt;The client is a Windows Forms application that allows clients to log on using a domain user name and password.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl09" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl09',this);" href="http://msdn.microsoft.com/en-us/library/ms733098.aspx"&gt;Message Security with a Certificate Client&lt;/a&gt;&lt;br /&gt;Servers have certificates, and each client has a certificate. A security context is established through Transport Layer Security (TLS) negotiation.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl10" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl10',this);" href="http://msdn.microsoft.com/en-us/library/ms729709.aspx"&gt;Message Security with a Windows Client&lt;/a&gt;&lt;br /&gt;A variation of the certificate client. Servers have certificates, and each client has a certificate. A security context is established through TLS negotiation.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl11" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl11',this);" href="http://msdn.microsoft.com/en-us/library/ms735117.aspx"&gt;Message Security with a Windows Client without Credential Negotiation&lt;/a&gt;&lt;br /&gt;Shows a client and service secured by a Kerberos domain.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl12" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl12',this);" href="http://msdn.microsoft.com/en-us/library/ms733102.aspx"&gt;Message Security with Mutual Certificates&lt;/a&gt;&lt;br /&gt;Servers have certificates, and each client has a certificate. The server certificate is distributed with the application and is available out of band.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl13" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl13',this);" href="http://msdn.microsoft.com/en-us/library/ms789013.aspx"&gt;Message Security with Issued Tokens&lt;/a&gt;&lt;br /&gt;Federated security that enables the establishment of trust between independent domains.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;a id="ctl00_rs1_mainContentContainer_ctl14" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl14',this);" href="http://msdn.microsoft.com/en-us/library/ms730288.aspx"&gt;Trusted Subsystem&lt;/a&gt;&lt;br /&gt;A client accesses one or more Web services that are distributed across a network. The Web services access additional resources (such as databases or other Web services) that must be secured.&lt;br /&gt;&lt;/div&gt;&lt;div align="right"&gt;from &lt;a href="http://msdn.microsoft.com/en-us/library/ms730301.aspx"&gt;MSDN&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4337539819187965868?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4337539819187965868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4337539819187965868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4337539819187965868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4337539819187965868'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/common-wcf-security-scenarios.html' title='Common WCF Security Scenarios'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-6111206556978512533</id><published>2008-06-03T16:09:00.003-04:00</published><updated>2008-06-03T17:23:19.373-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Using a Client Certificate to Restrict Access to a WCF Service Method</title><content type='html'>This post is based on &lt;a href="http://msdn.microsoft.com/en-us/library/ms731200.aspx"&gt;this article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Service Configuration&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;We are going to configure our service for Transport and Message Security with a client certificate, and we are going to add an attribute to a service method to restrict access only to clients that present the correct certificate. We will use the WSHttpBinding. The port is already configured for https from this &lt;a href="http://initializecomponent.blogspot.com/2008/06/configuring-port-for-ssltls.html"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First configure the binding:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;WSHttpBinding binding = new WSHttpBinding();&lt;br /&gt;binding.Security.Mode = SecurityMode.TransportWithMessageCredential;&lt;br /&gt;binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;&lt;br /&gt;binding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To designate the certificate that is permitted to access the service method, you will need to know &lt;a href="http://initializecomponent.blogspot.com/2008/06/viewing-ssltls-certificates.html"&gt;the subject name and thumbprint of the certificate&lt;/a&gt;. Import &lt;span style="font-family:courier new;"&gt;System.Security.Permissions&lt;/span&gt; and decorate the method with the following attribute:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;[PrincipalPermission(SecurityAction.Demand,&lt;br /&gt;Name = "CN=joeuser.example.com; ddf5066afceb34a95ff75795ced345ff549464202")]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here the Name parameter is equal to the certificate Subject followed by a semi-colon, a space, then the certificate Thumbprint. Multiple attributes can be added to support more than one client certificate. The final configuration option is to set the mode on the service to map the certificate information to this format (Subject; Thumbprint). This is done through the ServiceBehaviorAuthorizationMode (set it to UseAspNetRoles). You will need to import &lt;span style="font-family:courier new;"&gt;System.ServiceModel.Description&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;ServiceHost host = ...&lt;br /&gt;ServiceAuthorizationBehavior b = host.Description.Behaviors.Find&lt;serviceauthorizationbehavior&gt;();&lt;br /&gt;b.PrincipalPermissionMode = PrincipalPermissionMode.UseAspNetRoles;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Client Configuration&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Now we need to tell the client which certificate to present to the service. The same method is called whether you are using a Client Proxy or have created a ChannelFactory. I will show the example using a ChannelFactory. This must be done before creating the Channel.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;factory.Credentials.ClientCertificate.SetCertificate(&lt;br /&gt;System.Security.Cryptography.X509Certificates.StoreLocation.LocalMachine,&lt;br /&gt;System.Security.Cryptography.X509Certificates.StoreName.My,&lt;br /&gt;System.Security.Cryptography.X509Certificates.X509FindType.FindBySerialNumber,&lt;br /&gt;"1a2fa58b000000003a5c");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this case, I am looking it up by Serial Number, but the certificate can be found by Thumbprint, Subject Name, or a number of other fields. Again, use the MMC Certificate Snap-in to look up the information.&lt;br /&gt;&lt;br /&gt;That's all there is to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-6111206556978512533?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/6111206556978512533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=6111206556978512533' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6111206556978512533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/6111206556978512533'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/using-client-certificate-to-restrict.html' title='Using a Client Certificate to Restrict Access to a WCF Service Method'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7553888068321152713</id><published>2008-06-03T12:50:00.005-04:00</published><updated>2008-06-03T13:50:14.675-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Configuring a WCF Binding for https</title><content type='html'>Both BasicHttpBinding and WSHttpBinding support Transport Security (https). However, neither do it by default. The binding must be configured correctly. Here is how to do it in code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;BasicHttpBinding binding = new BasicHttpBinding();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;binding.Security.Mode = BasicHttpSecurityMode.Transport;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or simply&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For WSHttpBinding:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;WSHttpBinding binding = new WSHttpBinding();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;binding.Security.Mode = SecurityMode.&lt;br /&gt;TransportWithMessageCredential;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is a summary of the &lt;a href="http://msdn.microsoft.com/en-us/library/ms730879.aspx"&gt;System-provided Bindings&lt;/a&gt;. Note that the NetTcp bindings have Transport security (encryption) enabled by default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7553888068321152713?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7553888068321152713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7553888068321152713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7553888068321152713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7553888068321152713'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/configuring-wcf-binding-for-https.html' title='Configuring a WCF Binding for https'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-7633884550680410440</id><published>2008-06-03T10:54:00.015-04:00</published><updated>2008-06-03T13:06:58.550-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Configuring a port for SSL/TLS</title><content type='html'>Note that what we usually refer to as SSL is now really TLS (&lt;a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer"&gt;Transport Layer Security&lt;/a&gt;).&lt;br /&gt;--------------&lt;br /&gt;If you want to use Transport Security with your http WCF service, there are two options:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Host your service in IIS.&lt;/li&gt;&lt;li&gt;Configure a port for SSL/TLS and self-host your web service. This will allow you to create a Windows Service that runs your web service over https.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Either way, you will need a certificate that identifies your host as trusted to the client and provides the public and private keys that are used for negotiating the encrypted transfer. For a production environment you will need to obtain the certificate from a &lt;a href="http://en.wikipedia.org/wiki/Certificate_authority"&gt;Certificate Authority&lt;/a&gt; (CA).&lt;/p&gt;&lt;p&gt;For development and testing, we can create our own CA and then issue a test certificate from that CA. It can't be used in production because the clients will not have a trusted relationship with that CA, but we will configure our test client to trust it. You will need the MMC snap-in from &lt;a href="http://initializecomponent.blogspot.com/2008/06/viewing-ssltls-certificates.html"&gt;my previous post&lt;/a&gt;. Run MMC and Open the SSL Snap-in that you previously configured. This way you will see the certificates as they are created in the &lt;a href="http://technet2.microsoft.com/windowsserver/en/library/1c4d3c02-e996-450a-bf4f-9a12d245a7eb1033.mspx?mfr=true"&gt;Certificate Store&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;You will also need the makecert.exe tool. You will have it if you have Visual Studio or the .NET Framework SDK. Go to your Start Menu and run the appropriate Command Line Environment.&lt;/p&gt;&lt;p&gt;Finally, you will need httpcfg.exe (&lt;a href="http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&amp;amp;familyid=49ae8576-9bb9-4126-9761-ba8011fabf38&amp;amp;displaylang=en"&gt;download for Windows XP SP2&lt;/a&gt;). Vista users will use netsh.exe. This tool will be used to associate the certificate with the port.&lt;/p&gt;&lt;p&gt;The instructions for creating the certificate are based on Chris Jackson's &lt;a href="http://blogs.msdn.com/cjacks/archive/2005/11/15/493122.aspx"&gt;post&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Create the CA certificate&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;At the command line (all one command),&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;makecert -pe -n "CN=Test and Dev Root Authority" -ss my -sr LocalMachine -a sha1 -sky signature -r "Test and Dev Root Authority.cer"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Now, if you look in the Local Computer &lt;span style="font-family:courier new;"&gt;(-sr LocalMachine)&lt;/span&gt; section of the SSL Certificates MMC Console, you will find a certificate in the Personal\Certificates folder &lt;span style="font-family:courier new;"&gt;(-ss my)&lt;/span&gt;. You may need to refresh (F5) the folder.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Create the Test Certificate&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Next, we will create the certificate to be assigned to the port. The name of the certificate must match the hostname in the URL that the client will use to access the service. Otherwise, the client will refuse to complete the handshake. Sometimes you get this error in your browser when the certificate name does not match the URL. Just as in the browser scenario, it is possible to configure the WCF client to ignore the mismatch, but I will leave that to a future post. &lt;/p&gt;&lt;p&gt;If you want to access the service via &lt;span style="font-family:courier new;"&gt;&lt;a href="https://testserver:8081/service"&gt;https://testserver:8081/service&lt;/a&gt;, &lt;/span&gt;enter the following at the command line (all one command),&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;makecert -pe -n "CN=testserver" -ss my -sr LocalMachine -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -in "Test and Dev Root Authority" -is MY &lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;-ir LocalMachine -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 "Test and Dev SSL.cer"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Again, you will find a new certificate in the Personal\Certificates folder on the Local Computer main node. If you double-click to view it you will see that it is not trusted. That is because your computer does not trust the CA certificate that we made and used to sign the testserver certificate.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Trust the CA&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To trust the new CA certificate drag it from the Personal\Certificates folder to the Trusted Root Certificate Authorities\Certificates folder below it. Now if you open the testserver certificate, it will show as valid.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Configure the port for https&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The last step is to configure a port (8081 in this example) to use the testserver certificate for SSL/TLS. The HTTP.SYS driver will use the certificate's thumbprint to look it up in the certificate store, so open the testserver certificate and go to the details tab. Scroll to the bottom and select the Thumbprint property. The text box below it will show the value with spaces:&lt;br /&gt;71 d1 ea 2b 7d 2e cf 75 ac a5 60 1f 66 94 9b b6 ee aa be 44.&lt;/p&gt;&lt;p&gt;We will use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms733791.aspx"&gt;httpcfg.exe command &lt;/a&gt;to configure it. It is probably located in C:\Program Files\Support Tools. You will need to remove the spaces from the thumbprint hash value.&lt;/p&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;p&gt;httpcfg set ssl -i 0.0.0.0:8081 -h 71d1ea2b7d2ecf75aca5601f66949bb6eeaabe44 -f 2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The -f 2 option will allow us to use client certificates to authenticte the client in a later post. The 0.0.0.0 IP address means all IP addesses on the computer. If you only want to associate it with a single IP address, use that one.&lt;/p&gt;&lt;p&gt;Now you can &lt;a href="http://initializecomponent.blogspot.com/2008/06/configuring-wcf-binding-for-https.html"&gt;configure your service &lt;/a&gt;to listen on https.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-7633884550680410440?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/7633884550680410440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=7633884550680410440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7633884550680410440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/7633884550680410440'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/configuring-port-for-ssltls.html' title='Configuring a port for SSL/TLS'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-8734922885146545393</id><published>2008-06-02T15:49:00.005-04:00</published><updated>2008-06-02T21:50:20.579-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Viewing SSL/TLS Certificates</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;When setting up self-hosted WCF services to run under https, it's useful to be able to view the Certificates that are installed and discover their thumbprints (hash values).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;These articles explain:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms788967.aspx"&gt;&lt;span style="font-family:trebuchet ms;"&gt;How to View Certificates with the MMC Snap-in.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms734695.aspx"&gt;&lt;span style="font-family:trebuchet ms;"&gt;How to retrieve the Thumbprint of a Certificate.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you have the hash value for the certificate, it is used as a lookup by the &lt;a href="http://www.dotnetjunkies.ddj.com/Article/99DD7042-532D-4DB4-8625-1CD8BF422D64.dcik"&gt;HTTP.SYS driver &lt;/a&gt;to locate the server certificate that will be used for https encryption/decryption. I'll explain how to configure the HTTP.SYS driver for SSL/TLS in a future post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-8734922885146545393?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/8734922885146545393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=8734922885146545393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8734922885146545393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/8734922885146545393'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/06/viewing-ssltls-certificates.html' title='Viewing SSL/TLS Certificates'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-5153504055016296245</id><published>2008-05-31T20:02:00.005-04:00</published><updated>2008-06-01T07:10:01.784-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF Books</title><content type='html'>&lt;a href="http://www.amazon.com/Learning-WCF-Hands-Michele-Bustamante/dp/0596101627/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1212278593&amp;amp;sr=8-1"&gt;&lt;strong&gt;&lt;span style="font-family:trebuchet ms;"&gt;Learning WCF: A Hands-on Guide&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt; by Michele Leroux Bustamante&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;A good beginners guide to WCF.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0596526997/ref=pd_cp_b_1?pf_rd_p=317711001&amp;amp;pf_rd_s=center-41&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0596101627&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0FMG7QKWMSJE850S3Z8A"&gt;&lt;strong&gt;&lt;span style="font-family:trebuchet ms;"&gt;Programming WCF Services &lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt;by Juval Lowy&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Explains the architectural aspects of WCF and how it was engineered. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Essential-Windows-Communication-Foundation-WCF/dp/0321440064/ref=pd_bbs_sr_3?ie=UTF8&amp;amp;s=books&amp;amp;qid=1212278783&amp;amp;sr=1-3"&gt;&lt;strong&gt;&lt;span style="font-family:trebuchet ms;"&gt;Essential Windows Communication Foundation (WCF): For .NET Framework 3.5&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt; by Steve Resnick, Richard Crane, Chris Bowen&lt;/strong&gt;&lt;br /&gt;Good guide to the changes introduced by Visual Studio 2008 and .NET 3.5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Inside-Windows-Communication-Foundation-Developer/dp/0735623066/ref=sr_1_12?ie=UTF8&amp;amp;s=books&amp;amp;qid=1212278783&amp;amp;sr=1-12"&gt;&lt;strong&gt;&lt;span style="font-family:trebuchet ms;"&gt;Inside Windows Communication Foundation&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;strong&gt; by Justin Smith&lt;/strong&gt;&lt;br /&gt;This is a great reference to WCF internals. Advanced programmers only.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-5153504055016296245?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/5153504055016296245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=5153504055016296245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5153504055016296245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/5153504055016296245'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/05/wcf-books.html' title='WCF Books'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4727337522273836585</id><published>2008-05-31T17:36:00.001-04:00</published><updated>2008-06-05T13:50:57.634-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unity'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Patterns and Practices'/><title type='text'>New from Microsoft Patterns and Practices</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/practices/default.aspx"&gt;Microsoft p&amp;amp;p &lt;/a&gt;has recently released the following:&lt;br /&gt;&lt;br /&gt;Enterprise Library 4.0 (VS 2008 support) – no public APIs have been changed from 3.1&lt;br /&gt;Smart Client Software Factory (SCSF) for VS 2008&lt;br /&gt;Web Service Software Factory Modeling Edition (WSSF:ME) for VS2008&lt;br /&gt;Unity 1.1 – a new Dependency Injection container based on the old DI AppBlock&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4727337522273836585?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4727337522273836585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4727337522273836585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4727337522273836585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4727337522273836585'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/05/new-from-microsoft-patterns-and.html' title='New from Microsoft Patterns and Practices'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-4683779705282842700</id><published>2008-05-31T17:31:00.000-04:00</published><updated>2008-05-31T17:38:13.669-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Visual Studio 2008 SP1 Beta and .NET 3.5 SP1 Beta</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Here is &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott&lt;/a&gt;&lt;/span&gt;&lt;a href="http://weblogs.asp.net/scottgu/"&gt; Guthrie&lt;/a&gt;'s &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx"&gt;announcement&lt;/a&gt;.&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;The service packs are scheduled to RTM this summer.&lt;br /&gt;&lt;br /&gt;I think the following are useful features:&lt;br /&gt;- Faster application startup times&lt;br /&gt;- .NET Framework Client Profile: only includes the client side libraries for a smaller download.&lt;br /&gt;- ClickOnce improvements&lt;br /&gt;- WPF Improvements&lt;br /&gt;- The ADO.NET Entity Framework and LINQ to Entities (yay!)&lt;br /&gt;- Astoria: a REST-based data service&lt;br /&gt;- WCF improvements&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-4683779705282842700?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/4683779705282842700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=4683779705282842700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4683779705282842700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/4683779705282842700'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/05/visual-studio-2008-sp1-beta-and-net-35.html' title='Visual Studio 2008 SP1 Beta and .NET 3.5 SP1 Beta'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7459801763503956083.post-3061601704276796893</id><published>2008-05-31T17:23:00.000-04:00</published><updated>2008-05-31T17:29:38.389-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><title type='text'>Microsoft Visual Studio 2008 Training Kit</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Microsoft has released a &lt;/span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=8BDAA836-0BBA-4393-94DB-6C3C4A0C98A1&amp;amp;displaylang=en"&gt;&lt;span style="font-family:trebuchet ms;"&gt;training kit &lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;for &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Visual Studio 2008&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Overview&lt;br /&gt;&lt;/span&gt;&lt;a name="Description"&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The Visual Studio 2008 and .NET Framework 3.5 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Trebuchet MS;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7459801763503956083-3061601704276796893?l=initializecomponent.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://initializecomponent.blogspot.com/feeds/3061601704276796893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7459801763503956083&amp;postID=3061601704276796893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3061601704276796893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7459801763503956083/posts/default/3061601704276796893'/><link rel='alternate' type='text/html' href='http://initializecomponent.blogspot.com/2008/05/microsoft-visual-studio-2008-training.html' title='Microsoft Visual Studio 2008 Training Kit'/><author><name>Ray Henry</name><uri>http://www.blogger.com/profile/09354173171130143899</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
