<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Develop/Design : IDevign</title>
	<atom:link href="http://idevign.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://idevign.wordpress.com</link>
	<description>Luke, I&#039;m your factory...</description>
	<lastBuildDate>Fri, 20 Jan 2012 14:19:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='idevign.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7e2e2de056960c3ed0aba770fd134485?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Develop/Design : IDevign</title>
		<link>http://idevign.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://idevign.wordpress.com/osd.xml" title="Develop/Design : IDevign" />
	<atom:link rel='hub' href='http://idevign.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Model driven software development, anybody?!</title>
		<link>http://idevign.wordpress.com/2011/12/19/model-driven-software-development-anybody/</link>
		<comments>http://idevign.wordpress.com/2011/12/19/model-driven-software-development-anybody/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 07:43:14 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Jobs]]></category>
		<category><![CDATA[MDA]]></category>
		<category><![CDATA[MDSD]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/2011/12/19/model-driven-software-development-anybody/</guid>
		<description><![CDATA[My friends at Apliconus just put their new website up: http://www.apliconus.de. They are looking for people with the same vision to support them. Interested in working on the new platforms (Win 8 Tablets and WP 7.5) and doing real software development? Just contact them directly via their website or drop me a line.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=289&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My friends at Apliconus just put their new website up: <a href="http://www.apliconus.de/Pages/home.aspx">http://www.apliconus.de</a>. They are looking for people with the same vision to support them. Interested in working on the new platforms (Win 8 Tablets and WP 7.5) and doing real software development? Just contact them directly via their website or drop me a line.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=289&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2011/12/19/model-driven-software-development-anybody/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>The Dynamic Duo: ExpandoObject and DynamicObject &#8211; What&#8217;s missing&#8230;</title>
		<link>http://idevign.wordpress.com/2011/11/21/the-dynamic-duo-expandoobject-and-dynamicobject-whats-missing/</link>
		<comments>http://idevign.wordpress.com/2011/11/21/the-dynamic-duo-expandoobject-and-dynamicobject-whats-missing/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 13:00:07 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dynamic]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=229</guid>
		<description><![CDATA[Dynamic Duo Part 1 Dynamic Duo Part 2 So after looking at the &#8220;Dynamic Duo&#8221; in detail it appears there&#8217;s something missing. To further utilize the dynamic support it would be great to have a generic version of DynamicObject that would take an Interface as a type parameter so you could define sort of an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=229&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://idevign.wordpress.com/2011/11/15/the-dynamic-duo-expandoobject-and-dynamicobject-part-1/" title="The Dynamic Duo: ExpandoObject and DynamicObject – Part 1" target="_blank">Dynamic Duo Part 1</a><br />
<a href="http://idevign.wordpress.com/2011/11/18/the-dynamic-duo-expandoobject-and-dynamicobject-part-2/" title="The Dynamic Duo: ExpandoObject and DynamicObject – Part 2" target="_blank">Dynamic Duo Part 2</a></p>
<p>So after looking at the &#8220;Dynamic Duo&#8221; in detail it appears there&#8217;s something missing. To further utilize the dynamic support it would be great to have a generic version of <em>DynamicObject</em> that would take an Interface as a type parameter so you could define sort of an contract for a subset of an object&#8217;s data (actually behavior) besides additional dynamic data. Something like:</p>
<p><pre class="brush: csharp;">
public class MyDynamicObject : DynamicObject&lt;IMyContract&gt;
{
}

var name = new MyDynamicObject().Name;
</pre></p>
<p>And have Intellisense provide Feedback and show (at least some) of the typos. Really looking forward to that.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=229&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2011/11/21/the-dynamic-duo-expandoobject-and-dynamicobject-whats-missing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>The Dynamic Duo: ExpandoObject and DynamicObject &#8211; Part 2</title>
		<link>http://idevign.wordpress.com/2011/11/18/the-dynamic-duo-expandoobject-and-dynamicobject-part-2/</link>
		<comments>http://idevign.wordpress.com/2011/11/18/the-dynamic-duo-expandoobject-and-dynamicobject-part-2/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 08:42:34 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dynamic]]></category>
		<category><![CDATA[DynamicObject]]></category>
		<category><![CDATA[DynamicProxy]]></category>
		<category><![CDATA[ExpandoObject]]></category>
		<category><![CDATA[PostSharp]]></category>
		<category><![CDATA[Reflection]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=207</guid>
		<description><![CDATA[A closer look at DynamicObject with a simple sample of how to use and integrate it.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=207&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>DISCLAIMER: PLEASE READ THE PERFOMANCE IMPLICATIONS AT THE END OF THIS POST! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://idevign.wordpress.com/2011/11/15/the-dynamic-duo-expandoobject-and-dynamicobject-part-1/" title="The Dynamic Duo: ExpandoObject and DynamicObject – Part 1">Dynamic Duo Part 1</a></p>
<p>The <em>ExpandoObject</em> I was talking about in my last post is actually not too much of a help in most cases meaning I didn&#8217;t miss it too much before it was there. There are some special scenarios but that&#8217;s about it. A much more interesting beast is <em>DynamicObject</em>. While the <em>ExpandoObject</em> is holding a internal collection of Properties and their values, <em>DynamicObject</em> is providing overrideable methods for member access like getting or setting members, calling methods and more. All calls on this object are channeled into a few methods. Every access to a Property like <code>var name= myDynamicPerson.FirstName;</code> will actually result in a call to the Method <code>bool TryGetMember(GetMemberBinder binder, out object result)</code>. From there you can do with it whatever you want. Within the binder parameter is the Property <em>Name</em>, which gives you the member name asked for in the first place. For the above example its value would be &#8220;FirstName&#8221;. You can then access the Property value via Reflection or Expressions. This is a perfect place to put some code around it, decorating the actual call. The following code shows a simple override for Property getters:</p>
<p><pre class="brush: csharp;">
var _Person = new DynamicPerson{ FirstName = &quot;Paulie&quot; };

public override bool TryGetMember(GetMemberBinder binder, out object result)
{
   result = _Person.GetProperty(binder.Name).GetValue(_Person, null);

   return true;
}
</pre></p>
<p>Using <code>binder.Name</code> the value for the requested Property is retrieved and put into the out variable <code>result</code>. The boolean return value indicates wether the call was successful meaning returning false will result into an Exception stating the requested member could not be found on the target object. </p>
<p>Using this approach it gets easy to actually implement single responsibilities like tracing, logging or security into different classes and chain these. Tracing could be done like this for example:<br />
<pre class="brush: csharp;">
public class DynamicTracer : DynamicObject
{
    private readonly DynamicObject decoratedObject;
    private ITracer _Tracer = new FakeTracer(); 

    public DynamicTracer(DynamicObject decoratedObject)
    {
        this.decoratedObject = decoratedObject;
    }

    public override bool TryGetMember(GetMemberBinder binder, out object result)
    {
        _Tracer.Trace(string.Format(&quot;-&gt; Before member access ({0})&quot;, binder.Name));
        decoratedObject.TryGetMember(binder, out result);
        _Tracer.Trace(string.Format(&quot;-&gt; After member access ({0})&quot;, binder.Name));

        return true;
    }
}
</pre></p>
<p>It&#8217;s just wrapped around the original <em>DynamicObject</em> calling its <em>TryGetMember</em> method with the given Parameters. All that&#8217;s needed is the target object (dynamic) which is injected via the constructor and the actual call gets decorated with the tracing calls.</p>
<p>This can be repeated to achieve a real chain of functionality (Handler chain). A simple (and pretty useless) security managing class could look like this:</p>
<p><pre class="brush: csharp;">
public class DynamicSecurityManager : DynamicObject
{
    private readonly DynamicObject decoratedObject;

    public DynamicSecurityManager(DynamicObject decoratedObject)
    {
        this.decoratedObject = decoratedObject;
    }

    public override bool TryGetMember(GetMemberBinder binder, out object result)
    {
        result = null;
        if(binder.Name != &quot;SecureInfo&quot;)
        {
            decoratedObject.TryGetMember(binder, out result);
            return true;
        }

        System.Console.WriteLine(&quot;-&gt; The requested info is not for your eyes!!!&quot;);
        return true;
    }
}
</pre></p>
<p>You would then instantiate and use it like this:<br />
<pre class="brush: csharp;">
dynamic person = new DynamicSecurityManager( 
                    new DynamicTracer( 
                        new DynamicPerson( 
                            new Person { FirstName = &quot;Paulie&quot; })));

var name = person.FirstName;
</pre></p>
<p>What this gives you is the actual object (DynamicPerson) surrounded by a Tracing component surrounded by a security component. </p>
<p>So when should you use this?! Well you shouldn&#8217;t forget that all calls will be based on Reflection, going this route. This doesn&#8217;t have to be a problem, just be aware of the implications. This means performance will degrade when doing more calls via this technique. This can be adressed with caching the compiled invocation delegates or even better the usage of <a href="http://www.codeproject.com/KB/cs/HyperPropertyDescriptor.aspx" target="_blank">HyperPropertyDescriptors</a>. To be honest there are better solutions around for most situations, but not all. There is the Castle <a href="http://www.castleproject.org/dynamicproxy/index.html" target="_blank">DynamicProxy</a> as long as all target members are virtual and there&#8217;s <a href="http://www.sharpcrafters.com/" target="_blank">PostSharp</a> for Aspect Oriented Programming using a post compiler so the resulting code will be executed like it was written that way. Direct invocations, no reflection, no Voodoo&#8230;</p>
<p>Still, if you don&#8217;t want to introduce third party libs or don&#8217;t want to pay for PostSharp (there&#8217;s a free community editon available) <em>DynamicObject </em>might be something to try.</p>
<p>Get the sample code from <a title="DynamicObject.zip" href="http://dl.dropbox.com/u/13456770/IDevign/IDevign.Dynamic.zip">http://dl.dropbox.com/u/13456770/IDevign/IDevign.Dynamic.zip</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=207&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2011/11/18/the-dynamic-duo-expandoobject-and-dynamicobject-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>The Dynamic Duo: ExpandoObject and DynamicObject &#8211; Part 1</title>
		<link>http://idevign.wordpress.com/2011/11/15/the-dynamic-duo-expandoobject-and-dynamicobject-part-1/</link>
		<comments>http://idevign.wordpress.com/2011/11/15/the-dynamic-duo-expandoobject-and-dynamicobject-part-1/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 15:06:13 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dynamic]]></category>
		<category><![CDATA[DynamicObject]]></category>
		<category><![CDATA[ExpandoObject]]></category>
		<category><![CDATA[IDynamicMetaObjectProvider]]></category>
		<category><![CDATA[Reflection]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=204</guid>
		<description><![CDATA[After shortly explaining the new dynamic keyword in my previous post we will look at the ExpandoObject class which offers a dynamic structure. What does this mean exactly?! Well you can get and set Properties which are not existent at design-time and also define and call methods on the ExpandoObject like this: Furthermore it supports [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=204&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After shortly explaining the new <em>dynamic</em> keyword in my previous post we will look at the <em>ExpandoObject</em> class which offers a dynamic structure. What does this mean exactly?! Well you can get and set Properties which are not existent at design-time and also define and call methods on the <em>ExpandoObject</em> like this:</p>
<p><pre class="brush: csharp;">
dynamic expando = new ExpandoObject()
expando.MyProperty1 = &quot;This is a string prop&quot;;
expando.MyProperty2 = 12;
expando.MyFunction = (Func&lt;String&gt;)(() =&gt;
                     {
                         return String.Format(&quot;{0}&quot;, expando.MyProperty1);
                     });
</pre></p>
<p>Furthermore it supports change notifications via <em>INotifyPropertyChanged</em> out of the box as well as Events (sort of).</br><br />
So do you need this? As always: it depends. On what? Well if you are looking for a dynamic structure you could also use a combination of Dictionary-Voodoo like this:</p>
<p><pre class="brush: csharp;">
Dictionary&lt;String, object&gt; paulie = new Dictionary&lt;string, object&gt;();
paulie[&quot;FirstName&quot;] = &quot;Paulie&quot;;
paulie[&quot;LastName&quot;] = &quot;Baker&quot;;

Dictionary&lt;String, object&gt; people = new Dictionary&lt;string, object&gt;();
people[&quot;Paulie&quot;] = paulie;

Console.WriteLine(((Dictionary&lt;string, object&gt;)people[&quot;Paulie&quot;])[&quot;FirstName&quot;]);
</pre></p>
<p>Besides the much cleaner coding, there&#8217;s again INotifyPropertyChanged, Methods and Events on the Expando side. Also it implements <em>IDynamicMetaObjectProvider</em> which allows for interop with <em>DLR</em> objects.</br><br />
As always the source can be downloaded here: <a title="zipped_source" href="http://dl.dropbox.com/u/13456770/IDevign/IDevign.Expando.zip">http://dl.dropbox.com/u/13456770/IDevign/IDevign.Expando.zip</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=204&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2011/11/15/the-dynamic-duo-expandoobject-and-dynamicobject-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>The Dynamic Duo: Prerequisite &#8211; dynamic</title>
		<link>http://idevign.wordpress.com/2011/10/27/the-dynamic-duo-prerequesite-dynamic/</link>
		<comments>http://idevign.wordpress.com/2011/10/27/the-dynamic-duo-prerequesite-dynamic/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 09:20:33 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=190</guid>
		<description><![CDATA[A short introduction on the new dynamic keyword in C# 4.0.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=190&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a short introduction to the new dynamic keyword in C# 4.0. It should give an understanding about &#8220;dynamic&#8221; as the following 2 posts will build up on that. So without further ado here we go:</p>
<p>C# 4 introduced the new dynamic keyword for scenarios in which a more dynamic approach is helpful. This includes working with COM-Interop Types, the dynamic DLR languages like IronPython and IronRuby or working with the HTML Document Object Model (DOM). I usually like to use it when I am testing out different things with existing code where it is a shortcut to using reflection.</p>
<p><em>Show me an example already, will ya?!</em></p>
<p><pre class="brush: csharp;">((dynamic)myObject).Do(&quot;What has to be done&quot;);</pre></p>
<p>What&#8217;s interesting about this is that the compiler will not check whether the Method <code>Do</code> exists on the <code>myObject</code>&#8216;s class. It just assumes you know what you&#8217;re doing (yeah, right&#8230;) and will evaluate the call at runtime. And of course that means you will get a runtime exception instead of a compile-time exception which is usually considered a bad thing. Besides that dynamic execution is always noticeable slower than direct invocation so this is only for the cases where it does not work otherwise, is absolutely performance uncritical (as if you could say before, sure&#8230;) or you&#8217;re using Reflection anyways.</p>
<p>Summing up: You can turn off compiler checking on dynamic calls but be aware you are losing benefits of the static checking compile time safety and invocation speed! If that&#8217;s acceptable: go on! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As a side note: ReSharper will list member usages divided into direct and dynamic invocations, although as always that&#8217;s a setting and you can tweak it any way you like.</p>
<p>You can download the <a href="http://dl.dropbox.com/u/13456770/IDevign/Dynamic.zip" title="dynamic VS-Solution">linked</a> solution to see a few simple variations of dynamic usage including dynamic parameters which allows you to pass in any object as the signature of the called method will not be evaluated anymore.</p>
<p>And remember: &#8220;With great power comes great responsibility!&#8221; <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=190&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2011/10/27/the-dynamic-duo-prerequesite-dynamic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>Killer Slide Desks</title>
		<link>http://idevign.wordpress.com/2010/09/28/killer-slide-desks/</link>
		<comments>http://idevign.wordpress.com/2010/09/28/killer-slide-desks/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 12:43:01 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[Design Stuff]]></category>
		<category><![CDATA[Slide Desk Design]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=181</guid>
		<description><![CDATA[Just a shorty: some examples of really great slide desks for any slideware (PowerPoint, KeyNote, etc.) http://noteandpoint.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=181&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a shorty: some examples of really great slide desks for any slideware (PowerPoint, KeyNote, etc.)</p>
<p><a href="http://noteandpoint.com/">http://noteandpoint.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=181&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2010/09/28/killer-slide-desks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>Code First with the Entity Framework 4.0 (CTP 4)</title>
		<link>http://idevign.wordpress.com/2010/09/24/code-first-with-ef4/</link>
		<comments>http://idevign.wordpress.com/2010/09/24/code-first-with-ef4/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 14:31:17 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework 4.0]]></category>
		<category><![CDATA[Code First]]></category>
		<category><![CDATA[EF 4.0]]></category>
		<category><![CDATA[Feature CTP]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=131</guid>
		<description><![CDATA[A complete "Code First" Sample / Demo for Entity Framework 4.0 and its Feature CTP 4.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=131&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since the next CTP of the new Entity Framework 4.0 is available, containing many new features, I will present a little guide on how to get started with the Code-First programming model. This means we will define a pure domain model and use it to let EF create our database schema. I do like the idea of developing my model in code and then utilize a db shaped for that model. Of course this can&#8217;t be always achieved, but I tend to work towards it.</p>
<p>First things first: You will need to install the EF 4.0 CTP 4. You can download it from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4e094902-aeff-4ee2-a12d-5881d4b0dd3e&amp;displaylang=en" target="_blank">here</a>.</p>
<h4>1. Setting the demo context</h4>
<p>We will be modeling a simple scenario from the real estate sector using properties, their adresses and agents who are selling the properties. Pretty simple, huh?!</p>
<h4>2. The sample code</h4>
<p>Open the Sample Solution (download is located at the end of the post) called <em>IDevign.EF4</em>. In there are two projects. The first one is called <em>IDevign.EF4.Core</em> and holds everything related to the Entity Framework like configuration, mapping and all loading/saving procedures. The second project is called <em>IDevign.EF4.Domain</em>. In here you will find the domain model which will then be persisted to the database. The following Class Diagram shows the entities we&#8217;re going to create:</p>
<p>&nbsp;</p>
<div id="attachment_154" class="wp-caption alignleft" style="width: 605px"><a href="http://idevign.files.wordpress.com/2010/09/classdiagram1.png"><img class="size-full wp-image-154" title="EF4 Sample Class Diagramm" src="http://idevign.files.wordpress.com/2010/09/classdiagram1.png?w=600" alt="EF4 Sample Class Diagramm"   /></a><p class="wp-caption-text">IDevign.Domain Class Diagramm</p></div>
<p>&nbsp;</p>
<p>As I said before this model is pretty trivial so we can concentrate on the real topic: the EF 4.0. Now focus on the entites. These are all simple classes containing only a few properties. Just to clarify: as these classes are entities you are encouraged to put some domain logic (methods / behaviour) into them, although this sample has no need for that.</p>
<h4>3. Creating the Domain Model</h4>
<p>The first class we are looking at is <em>RealEstateProperty </em>(Property is not technical in this case):</p>
<p><pre class="brush: csharp;">
public class RealEstateProperty
{
   public int Id { get; set; }
   public Agent ContractedBy { get; set; }
   public Address PropertyAddress { get; set; }
   public ICollection
 Buyers { get; set; }
}
</pre></p>
<p>Note that the Id Property will be taken as the Primary Key for this entity when using the Feature CTP 4 (see my previous post on EF 4 Conventions <a href="http://idevign.wordpress.com/2010/09/12/conventions-in-ef4/" target="_blank">here</a>). You don&#8217;t have to specify this explicitly like with the plain EF 4. The other point of interest is the <em>ICollection </em>of <em>PotentialBuyer </em>which stores people who are interested in buying this property. This results into an Foreign Key Relation from <em>PotentialBuyer </em>to <em>RealEstateProperty </em>which stores this information on each PotentialBuyer&#8217;s property interest. Also the addresses are entities by themselves. Again, this is not a full-scale domain model design regarding adresses as entities and not <em>complex types</em> (sql server feature), etc.</p>
<p><pre class="brush: csharp;">
public class Address
{
   public int Id { get; set; }
   public string Street { get; set; }
   public string StreetNo { get; set; }
   public string City { get; set; }
   public string Zip { get; set; }
}
</pre></p>
<p>Nothing special in here. But to spice things up a little I created a little inheritance part inside this demo. There are two kinds of persons: <em>Agents </em>and <em>PotentialBuyers</em>. <em>Agents </em>show and sell properties to <em>PotentialBuyers</em>. Both types inherit from Person. All Persons have a name therefore the fullname goes into the base class. The specific parts are in the two specialized classes. But how does this whole thing work?</p>
<h5>3.1 Inheritance Strategies:</h5>
<p>There are three different strategies how inheritance can be handled inside of an relational database. Without going into details on these strategies here is a little wrap-up:</p>
<ul>
<li><strong>Table Per Type (TPT)</strong> &#8211; This means there will be one table in the database for every type you map. In our case this would be three tables. One for <em>PotentialBuyer</em>, one for <em>Agent </em>and one for the base type <em>Person</em>.</li>
<li><strong>Table Per Hierarchy (TPH)</strong> &#8211; This is what we are doing here. There will be one table for all sorts of persons named <em>People</em>. It contains the data for <em>Agents </em>and <em>PotentialBuyers</em>. To differentiate between the two types an additional column is needed. This is a <em>Discriminator </em>column specifying the concrete type for each row. I will show you later how class hierarchies can be mapped using a <em>discriminator</em>.</li>
<li><strong>Table Per Concrete type (TPC)</strong> &#8211; The last strategy is using one table per concrete type. So in our case this would be two tables for <em>Agent </em>and <em>PotentialBuyer</em>. Each table will also hold the columns of the base type person. Using the first strategy (TPT) all base type data gets into its own table.</li>
</ul>
<p>Having explained the possibilities of mapping class hierarchies to a relational database, we will go with the second strategy <em>&#8220;Table Per Hierarchy&#8221;</em> which is the most intuitive one. So here is the code for the three entity classes:</p>
<p><pre class="brush: csharp;">
public abstract class Person
{
   public int Id { get; set; }
   public string FullName { get; set; }
}
</pre></p>
<p><pre class="brush: csharp;">
public class Agent : Person
{
   public ICollection Properties { get; set; }
}
</pre></p>
<p><pre class="brush: csharp;">
public class PotentialBuyer : Person
{
   public double MaxPrice { get; set; }
}
</pre></p>
<p>As shown in the above code <em>Agents </em>can have multiple objects (properties) for selling, while <em>PotentialBuyers </em>usually have some <em>MaxPrice </em>they are willing to pay. This is the simple Domain Model we will be using to create, save and load some data utilizing the EF 4.</p>
<h4>4. DbContext and DbSet&lt;TEntity&gt;</h4>
<p>When working with the standard EntityFramework there are two classes that are really important and often used: <em>ObjectContext </em>and <em>ObjectSet</em>. The new Feature CTP introduces two new simplified abstractions of these classes: <em>DbContext</em> and<em> DbSet&lt;TEntity&gt;</em>. There are several reasons why the new classes were introduced, one of them being full backward compatibility. So it is up to you wether you use the classic versions (Entity Designer Support e.g.) or the new ones which are essentially made for the Code-First flavor.</p>
<p>I created a class <em>RealEstatePropertyCatalog </em>which inherits from <em>DbContext </em>and called it (RealEstateProperty)Catalog, because it does not only allow to load or save entities, but it also gives access to <em>DbSets </em>of all entity types like <em>DbSet&lt;Agent&gt;</em> for example:</p>
<p><pre class="brush: csharp;">
public class RealEstatePropertyCatalog : DbContext
{
    public RealEstatePropertyCatalog(DbModel model)
        : base(model)
    { /* nothing here */}

    public DbSet Properties { get; set; }
    public DbSet
 People { get; set; }
    public DbSet Agents { get; set; }
    public DbSet
 Buyers { get; set; }
    public DbSet
&lt;address&gt; Adresses { get; set; }

    ///
    /// Here you can customize Schema related things.
    ///
    ///
&lt;span&gt; &lt;/span&gt;The model builder.
    protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        modelBuilder.Entity
()
            .MapHierarchy()
            .Case
(person =&gt; new { person.Id, person.FullName, Discriminator = 0 })
            .Case(agent =&gt; new { agent.Properties, Discriminator = 1 })
            .Case
(potentialBuyer =&gt; new { potentialBuyer.MaxPrice, Discriminator = 2 })
            .ToTable(&quot;dbo.Contacts&quot;);
    }
}
</pre></p>
<p>Besides the <em>DbSet </em>Properties the override of the <em>OnModelCreating </em>method is important. Here you can customize different aspects of the model creation. The above code is mainly using this feature for mapping class hierarchies to a single table using a descriminator. You can see the the call to <em>MapHierarchy()</em> for the <em>Person </em>entity and then following a <em>Case </em>construct to define the mappings for each type of the hierarchy. Note the Discriminator information to differentiate between them. Also the <em>ToTable()</em> Method defines the name of the table within SqlServer. Inside <em>OnModelCreating </em>you can fully customize the way the model is being built, but we&#8217;re not going to dig here much deeper for now.</p>
<h4>5. Mapping (Configuration)</h4>
<p>The next class we are looking at is <em>RealEstatePropertyConfiguration</em>. This is a mapping class and contains all information about what properties of an entity should be written into which column of the table. In the first release of the Entity Framework this sort of &#8220;external&#8221; mapping was not available so many people denied using it. NHibernate for example is offering this feature for years. Using the standard EF 4.0 you would have to define the Ids (Primary Keys) of all your entities here and everything else like relations. The Feature CTP and its Conventions takes care of all that for you. Actually you don&#8217;t need the class below, but I threw it in for reference purposes so that you can see how you&#8217;d normally map a class to the Database. Pretty nifty timesafer!  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><pre class="brush: csharp;">
public class RealEstatePropertyConfiguration : EntityConfiguration
{
    public RealEstatePropertyConfiguration()
    {
        HasRequired(property =&gt; property.ContractedBy).WithMany(a =&gt; a.Properties);
    }
}
</pre></p>
<h4>6. EF Configuration</h4>
<p>Now we will take a look at configuring our Code-First solution. The configuration code can be found inside the Bootstrapper class. This code could also be inside the main method but I just decided to move it into a new class to separate the configuration code a little from the rest. The whole configuration code is placed inside the <em>Run </em>Method:</p>
<p><pre class="brush: csharp;">
internal class Bootstrapper
{
    public DbModel Run()
    {
        // Takes the connection string from the app.config
        Database.DefaultConnectionFactory =
                      new SqlConnectionFactory(&quot;RealEstatePropertyCatalogConnectionString&quot;);

        #region Database Initialization

        // Changes in the DomainModel cannot be applied (yet) without
        // dropping the old database. Therefore changes result in an
        // Exception unless you force a db drop and recreate it.

        // additional strategies: (names are self-explanatory)
        // Database.SetInitializer(
                // new AlwaysRecreateDatabase());
        // Database.SetInitializer(
                // new CreateDatabaseOnlyIfNotExists());
        // Database.SetInitializer(
                // new RecreateDatabaseIfModelChanges());

        // switch off Generation if you have an existing Database
        //Database.SetInitializer(null);
        Database.SetInitializer(new RealEstatePropertyInitializer());

        #endregion

        var builder = new ModelBuilder();
        builder.Configurations.Add(new RealEstatePropertyConfiguration());
        builder.Entity
();
        builder.Entity
&lt;address&gt;();
        builder.Entity();

        return builder.CreateModel();
    }
}
</pre></p>
<p>Line 6 sets the <em>DefaultConnectionFactory</em>. There are predefined Factories like the <em>SqlConnectionFactory </em>(Sql Server) which can take a <em>ConnectionString </em>name. The <em>ConnectionString </em>is defined inside the <em>app.config</em> so choosing different EF configurations depending on your enviroment (Production, Development, Testing) can be easily achieved. Lines 20 to 26 are showing the available strategies for seting up your database when running the <em>Bootstrapper</em>, which is usually when starting the solution. Line 26 even shows a custom implementation (<em>RealEstatePropertyInitializer</em>), but let&#8217;s look at the standard strategies first, although the names are pretty self-explanatory:</p>
<ul>
<li><strong>AlwaysRecreateDatabase </strong>- This strategy always drops the whole database and recreates it. This is helpfull for full integration testing when an untouched db is what you need before every test.</li>
<li><strong>CreateDatabaseOnlyIfNotExists </strong>- If no database is found it will be created by the Entity Framework.</li>
<li><strong>RecreateDatabaseIfModelChanges </strong>- This only recreates your database if the underlying model (also the mapped entities) were changed.</li>
<li><strong>Custom </strong>- You can implement your own strategies which is what I did in the demo app.</li>
<li><strong>null </strong>- If you don&#8217;t need any initialization (read only or pre-existent database f.e.) you can just turn it off.</li>
</ul>
<p>Again a static method (<em>SetInitializer</em>) on the <em>Database </em>class can be used to set the initializer like we did before, when setting the <em>DefaultConnectionFactory</em>. It takes an instance of a recreation strategy. If you want to turn this feature off just put in null as parameter. I already said that you can implement your own custom strategy, but how does it work exactly?!</p>
<p><pre class="brush: csharp;">
public class RealEstatePropertyInitializer : AlwaysRecreateDatabase
{
    protected override void Seed(RealEstatePropertyCatalog context)
    {
        var agent1 = new Agent {FullName = &quot;Paula Waters&quot;};

        var prop1 = new RealEstateProperty {ContractedBy = agent1};
        var prop2 = new RealEstateProperty {ContractedBy = agent1};
        var prop3 = new RealEstateProperty {ContractedBy = agent1};

        agent1.Properties = new List {prop1, prop2, prop3};

        context.Agents.Add(agent1);
    }
}
</pre></p>
<p>This is a simple custom Initializer which inherits from the <em>AlwaysRecreateDatabase </em>strategy and afterwards put some init data into the database using the<em> context.Agents.Add</em> call.</p>
<p>Back to the last lines of the Run Method: Here we are just adding our configuration to the <em>ModelBuilder</em>, then we add all types we need in our model and finally call <em>CreateModel </em>which is the last thing to do before starting to utilize the Entity Framework. Now everything following is how to write /read data from the database using EF.</p>
<h4>7. Putting some data in and querying it</h4>
<p>Inside the <em>Program.cs</em> file you can find the <em>Main </em>method which contains all the data access code within an using statement for the <em>RealEstatePropertyCatalog</em>. Using such a <em>Context</em>/<em>Catalog </em>object is easily underestimated. There is a brilliant blog entry by Ayende Rahien on this topic for <em>NHibernate </em>which can be translated to EF. Just replace the word <em>ISession </em>with <em>DbContext</em>/<em>ObjectContext </em>in your Head: <a href="http://msdn.microsoft.com/en-us/magazine/ee819139.aspx" target="_blank">http://msdn.microsoft.com/en-us/magazine/ee819139.aspx</a>. Having said that let&#8217;s look at the last section. Inside the <em>Main </em>method we are creating an object graph, then add it to the context and call <em>SaveChanges </em>on it. Afterwards we can execute queries using <em>LINQ </em>against the <em>DbSets </em>within our Catalog.</p>
<h4>8. Summing it up</h4>
<p>That&#8217;s about it. I hope I managed to show you the ease of using the new EF, while still achieving persistance ignorance through using the Code-First model. I was pretty impressed when I first used the new Feature CTP and although it is not perfect yet, I believe it&#8217;s heading into the right direction. Let me know if this demo helped you and what you are thinking of the Feature CTP.</p>
<p><strong>Best regards</strong></p>
<p><strong>Gope</strong></p>
<p>SOURCE CODE: <a href="http://dl.dropbox.com/u/13456770/IDevign/IDevign.EF4.zip">DOWNLOAD</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=131&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2010/09/24/code-first-with-ef4/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>

		<media:content url="http://idevign.files.wordpress.com/2010/09/classdiagram1.png" medium="image">
			<media:title type="html">EF4 Sample Class Diagramm</media:title>
		</media:content>
	</item>
		<item>
		<title>Conventions in the Entity Framework 4.0 FEATURE CTP 4</title>
		<link>http://idevign.wordpress.com/2010/09/12/conventions-in-ef4/</link>
		<comments>http://idevign.wordpress.com/2010/09/12/conventions-in-ef4/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 17:16:11 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework 4.0]]></category>
		<category><![CDATA[Feature CTP]]></category>
		<category><![CDATA[Conventions]]></category>
		<category><![CDATA[EF 4.0]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=123</guid>
		<description><![CDATA[This post explains some of the new conventions which can be used to ease the setup of EF integration.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=123&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a few days ago the new Entity Framework 4 FEATURE CTP 4 was released containing exciting updates to the &#8220;Code First&#8221; programming model. I will be writing more on the new possibilities, but at first here are some of the new Conventions within EF 4.0. &#8230; ?? &#8230; Wait! A <strong>FEW </strong>days ago??? They were released in June! Uuuh&#8230; that&#8217;s right. And that&#8217;s exactly what happens when you create a draft and never finish it. So I didn&#8217;t change my starting line to always remind me on the following: &#8220;FINISH YOUR STUFF EARLY, SON&#8221;! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Back to the topic&#8230;</p>
<p>So what are conventions and how can we use them? Well, the good news is: conventions just work. You don&#8217;t have to do anything special to use them, but only follow a few rules in the naming of your entities and their properties. For example: books usually have an ISBN number as an identifier. You will have to tell EF that the property ISBN is the PrimaryKey for the entity Book. But if your entity was a customer who doesn&#8217;t have a natural id you could use a property like Id or CustomerId. Now, usually you still would need to tell EF that this is your PK. This is where conventions come into the game. Using its conventions, EF keeps looking for Properties in an entity with a specific naming style. If it finds one that is either named Id or is a combination of the entity name and the word Id like CustomerId it expects this to be the Identifier (PrimaryKey) for this entity. So, this can be pretty timesaving! Following you can see which new conventions can be found inside of  the new Feature CTP 4:</p>
<p><strong>Primary Keys:<br />
</strong>Just name the identifier property of your entity class Id or &#8220;entity + Id&#8221; (CustomerId f.e.) and it will be considered the primary key field. This is not case sensitive.</p>
<p><strong>Relationships:</strong><br />
This is a cool one: if you have two entities related to each other like in the following sample, these can be wired up pretty easy:</p>
<p><pre class="brush: csharp;">
 public class EntityOne
{
    public int Id { get; set; }
    public ICollection&lt;EntityTwo&gt; OtherEntities { get; set; }
}

public class EntityTwo
{
    public int Id { get; set; }
    public EntityOne Parent { get; set; }
}
</pre></p>
<p> One point though, this only works if there is only one navigation property on either of the two types.</p>
<p><strong>Type Discovery:</strong><br />
This is about referenced types. Using the regular release of EF 4.0 referenced types would not be taken into account if not specified via a derived context or using the fluent API. This is not as unsual, as it might sound at first. Remeber WCF contracts referencing custom types? There also is a special attribute (KnownTypeAttribute) to tell the DataContractSerializer that some types need to be included. Anyways, just use it and it will work now. No strange TypeNotFound Exceptions.</p>
<p><strong>Complex Types:</strong><br />
The last one for now is about complex types which represent custom types in Sql Server. You don&#8217;t have to register it explicitly, but EF will understand that a referenced type will be a complex type if no primary is defined or can be infered from the property names (see Primary Keys convention).</p>
<p>Although you don&#8217;t have to do anything to take advantage of this conventions I do beliefe it&#8217;s good to understand what conventions are in place and why EF 4.0 is behaving the way it does.</p>
<p>The next post on the EF 4.0 will be a full demo app. Until then, happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=123&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2010/09/12/conventions-in-ef4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>XAML: binding an ICommand to KeyUp Events and related</title>
		<link>http://idevign.wordpress.com/2010/06/17/xaml-binding-icommand-to-keyup/</link>
		<comments>http://idevign.wordpress.com/2010/06/17/xaml-binding-icommand-to-keyup/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 13:28:37 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=103</guid>
		<description><![CDATA[This post explains how to use Attached Properties to offer an bindable Property for an ICommand on a TextBox which gets triggered by an Enter keypress. This can be translated for any possible event.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=103&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently came across the problem to fire a command when pressing the enter key from within a TextBox control. There is no Command Property for Binding to an ICommand what indeed makes sense when you think about it. For which event would like the control to fire the command? When the mouse hovers over it or when you doubleclick it or when one specific key gets pressed? Right&#8230; that would require some manual handcrafting. Ok! Let&#8217;s do that: </p>
<h4>Prerequisites:</h4>
<p>To make life a little easier I am using the PRISM Framework (aka CAG &#8211; Composite Application Guidance for WPF and Silverlight -&gt; <a href="http://msdn.microsoft.com/en-us/library/ff648611.aspx">http://msdn.microsoft.com/en-us/library/ff648611.aspx</a>) and its contained DelegateCommand. This allows you to directly define a Command as a delegate within your code. You do not have to create a new class for that, but rather you can define it directly within your ViewModel Class. You can also use the MVVM Foundation RelayCommand (<a href="http://mvvmfoundation.codeplex.com/">http://mvvmfoundation.codeplex.com/</a>). It offers similar capabilities. For the demo code I extracted the two required classes from the PRISM Framework so you do not need it for compiling. </p>
<p>I am not gonna explain the MVVM stuff anymore. There are lots of ressources on the net you can find on that topic. </p>
<h4>Step 1: Define the ICommand to bind to within your ViewModel &#8211; You got one, right?! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </h4>
<p><pre class="brush: csharp;">
public DelegateCommand _EnterCommand;
public DelegateCommand EnterCommand
{
   get
   {
      return _EnterCommand ??
             (_EnterCommand = new DelegateCommand(o =&gt;;
                                  {
                                     LabelContent = &quot;You pressed enter!&quot;;
                                  },
                                  o =&gt;; true));
     }
  }

</pre></p>
<p>That&#8217;s how you define the command. It&#8217;s just a simple property of type ICommand. At first access we check for null and if it is not yet initialized, we create a new DelegateCommand which changes another Property within our ViewModel. That change will be reflected within the UI via DataBinding. So, what&#8217;s next?</p>
<h4>Step 2 (Markup): Use a KeyBinding</h4>
<p>The most simple way to achieve this is to use a <em>KeyBinding</em> like this:</p>
<p><pre class="brush: xml;">
&lt;TextBox&gt; 
   &lt;TextBox.InputBindings&gt; 
      &lt;KeyBinding Command=&quot;{Binding EnterCommand}&quot; Key=&quot;Enter&quot;/&gt; 
   &lt;/TextBox.InputBindings&gt; 
&lt;/TextBox&gt;
</pre></p>
<p>This will work out of the box but there&#8217;s also the possibility to create a <em>Behavior</em>. Behaviors were introduced by the Expression Blend Team but be used also without Blend. They encapsulate a given behavior which can be dropped on Controls and parameterized within the UI. If you need to achieve something like the above it might be even faster to just create a <em>Behavior</em> and drop it on all Controls that need it. Therefore:<br />
 </p>
<h4>Step 2 (Behavior): Create the actual EventHandling:</h4>
<p>First we need to create a class dedicated for the handling of the event: </p>
<p><pre class="brush: csharp;">
public class TextBoxEnterBehavior : CommandBehaviorBase&lt;TextBox&gt;
{
    /// &lt;summary&gt;
    /// Initializes a new instance of the &lt;see cref=&quot;TextBoxEnterBehavior&quot;/&gt; class.
    /// &lt;/summary&gt;
    /// &lt;param name=&quot;element&quot;&gt;The element.&lt;/param&gt;
    public TextBoxEnterBehavior(TextBox element) : base(element)
    {
       element.KeyUp +=(sender, args) =&gt; {
                                             if (args.Key == Key.Enter)
                                             {
                                                 base.ExecuteCommand();
                                             }
                                         };
    }
}
</pre></p>
<p>This is pretty straightforward. We only handle the wanted event inside the Constructor and trigger the execution of the command. The concrete command will be wired up later via DataBinding in XAML. Of course one could reach the args.Key to the DelegateCommand in the ViewModel for further processing but this depends on the requirements. If you are looking for a specific key stroke this behavior holds it all together. There&#8217;s no mixup of why/when the command gets triggered and what it&#8217;s supposed to do when being fired. </p>
<h4>Step 3: Create the Attached Properties for DataBinding</h4>
<p> We do need another class for that and I called it &#8220;Attached&#8221; which gives us a nice syntax when used like: ns:Attached.Command=&#8221;{ Binding MyCommand }&#8221;. The class looks like this (with all comments stripped off): </p>
<p><pre class="brush: csharp;">
public static class Attached
{
    private static readonly DependencyProperty CommandProperty = DependencyProperty.RegisterAttached(&quot;Command&quot;, typeof(ICommand), typeof(Attached), new PropertyMetadata(OnSetCommandCallback));
    private static readonly DependencyProperty TextBoxEnterCommandBehaviorProperty = DependencyProperty.RegisterAttached(&quot;TextBoxEnterCommandBehavior&quot;, typeof(TextBoxEnterBehavior), typeof(Attached), null); 

    public static ICommand GetCommand(DependencyObject obj)
    {
        return (ICommand) obj.GetValue(CommandProperty);
    } 

    public static void SetCommand(DependencyObject obj, ICommand value)
    {
        obj.SetValue(CommandProperty, value);
    } 

    private static void OnSetCommandCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
    {
        TextBox element = dependencyObject as TextBox;
        if(element != null)
        {
            TextBoxEnterBehavior behavior = GetOrCreateBehavior(element);
            behavior.Command = e.NewValue as ICommand;
        }
    } 

    private static TextBoxEnterBehavior GetOrCreateBehavior(TextBox element)
    {
        TextBoxEnterBehavior behavior = element.GetValue(TextBoxEnterCommandBehaviorProperty) as TextBoxEnterBehavior;
        if(behavior == null)
        {
            behavior = new TextBoxEnterBehavior(element);
            element.SetValue(TextBoxEnterCommandBehaviorProperty, behavior);
        } 

        return behavior;
    } 

    public static TextBoxEnterBehavior GetTextBoxEnterCommandBehavior(DependencyObject obj)
    {
        return (TextBoxEnterBehavior)obj.GetValue(TextBoxEnterCommandBehaviorProperty);
    } 

    public static void SetTextBoxEnterCommandBehaviour(DependencyObject obj, TextBoxEnterBehavior value)
    {
        obj.SetValue(TextBoxEnterCommandBehaviorProperty, value);
    } 

}
</pre></p>
<p>On top there are the two DependencyProperties for the DataBinding. CommandProperty is specifying a Callback for the Set Method (OnSetCommandCallback) which is doing the heavy lifting. It connects the TextBoxEnterBehavior, the Command and the TextBox.</p>
<h4>Step 4:  Binding to the DelegateCommand in XAML </h4>
<p>Now all that&#8217;s left to do is the binding within the view. It looks as simple as this: </p>
<pre>&lt;TextBox Name="MyText" Behaviors:Attached.Command="{ Binding EnterCommand }" Margin=...
 </pre>
<p>You can download the source code below. </p>
<p>Enjoy! </p>
<p><a href="http://dl.dropbox.com/u/13456770/IDevign/IDevign_KeyBinding_Source.zip">Source Code zip</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=103&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2010/06/17/xaml-binding-icommand-to-keyup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>
	</item>
		<item>
		<title>Test Lint: Free UnitTesting Best Practices Add-In for Visual Studio 2010</title>
		<link>http://idevign.wordpress.com/2010/05/04/test-lint-free-unittesting-best-practices-add-in-for-visual-studio-2010/</link>
		<comments>http://idevign.wordpress.com/2010/05/04/test-lint-free-unittesting-best-practices-add-in-for-visual-studio-2010/#comments</comments>
		<pubDate>Tue, 04 May 2010 06:13:59 +0000</pubDate>
		<dc:creator>Gope</dc:creator>
				<category><![CDATA[Design Stuff]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://idevign.wordpress.com/?p=88</guid>
		<description><![CDATA[Although I don&#8217;t like &#8220;Best Practices&#8221; as a term I think it&#8217;s the best description for this Add-In. The guys from Typemock built an VS 2010 Add-In showing code smells for Unit Tests. And NO! This is not just for the Typemock Framework but for all others as well. A little indicator icon on the left [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=88&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_90" class="wp-caption alignright" style="width: 391px"><a href="http://idevign.files.wordpress.com/2010/05/lint.jpg"><img src="http://idevign.files.wordpress.com/2010/05/lint.jpg?w=600" alt="" title="Lint Screenshot"   class="size-full wp-image-90" /></a><p class="wp-caption-text">The Lint Editor Helper</p></div>
<p>Although I don&#8217;t like &#8220;Best Practices&#8221; as a term I think it&#8217;s the best description for this Add-In. The guys from Typemock built an VS 2010 Add-In showing code smells for Unit Tests. And NO! This is not just for the Typemock Framework but for all others as well. A little indicator icon on the left editor side is showing possible problems within your test. When clicking on it a little window with contextual information and further help is opened.<br />
So what is Type Lint checking for?! To answer this one should refer to the brilliant book <a href="http://www.manning.com/osherove/" target="_blank">&#8220;The Art of Unit Testing&#8221;</a> by Roy Osherove who is also the guy behind the song: &#8220;Every Build You Break&#8221; (just imagine the melody of &#8220;Every Breath You Take&#8221;). Back to the topic: His book is a great introduction to Unit Testing and there are many hints inside of it. These were used as a basic ruleset for example <strong>don&#8217;t use conditionals (if / else) within your code</strong> or <strong>don&#8217;t call test methods from other test methods</strong>.</p>
<p>Currently people can help implement rules (yes, they also provide a Lint SDK), so this will get even better in the future.</p>
<p>Go download <a href="http://site.typemock.com/test-lint/" target="_blank">Test Lint</a>, have fun, learn something new and increase your (test) code quality!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idevign.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idevign.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idevign.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idevign.wordpress.com&amp;blog=6512007&amp;post=88&amp;subd=idevign&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idevign.wordpress.com/2010/05/04/test-lint-free-unittesting-best-practices-add-in-for-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a120a551f52dca54f790f886fe73b0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Gope</media:title>
		</media:content>

		<media:content url="http://idevign.files.wordpress.com/2010/05/lint.jpg" medium="image">
			<media:title type="html">Lint Screenshot</media:title>
		</media:content>
	</item>
	</channel>
</rss>
