<?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/"
	>

<channel>
	<title>Storm in a Jar</title>
	<atom:link href="http://www.storminajar.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.storminajar.net</link>
	<description>Grognak&#039;s journal of random ramblings.</description>
	<lastBuildDate>Sun, 29 Apr 2012 17:11:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>I do think theres a Squatch in these woods</title>
		<link>http://www.storminajar.net/2012/04/29/i-do-think-theres-a-squatch-in-these-woods/</link>
		<comments>http://www.storminajar.net/2012/04/29/i-do-think-theres-a-squatch-in-these-woods/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 11:09:18 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Finding Bigfoot]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1686</guid>
		<description><![CDATA[Ever seen Finding Bigfoot? It&#8217;s a show on Animal Planet about finding the legendary Sasquatch. There are four &#8220;researchers&#8221; (three believers, one skeptic) who go out into the woods at night hoping to get some Bigfoot action and capturing that elusive beast on camera. Before I continue, I&#8217;d like to make one thing clear. I [...]]]></description>
			<content:encoded><![CDATA[<p>Ever seen <a title="Finding Bigfoot" href="http://www.youtube.com/results?search_query=Fnding+Bigfoot&amp;oq=Fnding+Bigfoot&amp;aq=f&amp;aqi=g-s10&amp;aql=&amp;gs_l=youtube-psuggest.3..0i10l10.108.2601.0.2734.15.15.2.0.0.0.122.976.9j4.13.0.">Finding Bigfoot</a>? It&#8217;s a show on <a title="Finding Bigfoot website on Animal Planet" href="http://animal.discovery.com/tv/finding-bigfoot/">Animal Planet</a> about finding the legendary Sasquatch. There are four &#8220;researchers&#8221; (three believers, one skeptic) who go out into the woods at night hoping to get some Bigfoot action and capturing that elusive beast on camera.</p>
<p><img class="wp-image-1694 aligncenter" title="finding-bigfoot" src="http://www.storminajar.net/wp-content/uploads/2012/04/finding-bigfoot.jpg" alt="" width="477" height="263" /><span id="more-1686"></span>Before I continue, I&#8217;d like to make one thing clear. I don&#8217;t know whether Sasquatches are real or not. I&#8217;m torn on the issue. I&#8217;d like to think they are, but at the same time I find it extremely hard to believe. My reasoning behind this is that we (mankind) don&#8217;t know everything about our planet, there still are plenty of undiscovered things out there. Who knows what&#8217;s lurking deep in the woods? However, it would be quite remarkable that huge apelike creatures are <em>that</em> hard to find. On the other hand, I&#8217;ve also seen a show on Animal Planet about a guy trying to find Panda&#8217;s in the wild&#8230; we know those are real, yet they&#8217;re quite elusive to catch on camera as well.</p>
<p>Anyway, back to Finding Bigfoot. I got hooked on the show ever since I saw it on TV for the first time. Let&#8217;s ignore all the claims about fake footage and whatnot&#8230; it&#8217;s just a very entertaining show to watch. My favourite squatcher on the show has to be <a title="Cliff Barackman's official website." href="http://cliffbarackman.com/">Cliff Barackman</a>. He seems like a pretty down to earth guy, hoping to find a Bigfoot, but also willing to critically look at evidence. I&#8217;ve also read some statements where he seems to be rather annoyed with the producers of the show. He said they make it look as if they&#8217;re chasing something half the time, while that&#8217;s not the case at all. I found his website to be a pretty good read, actually!</p>
<p>I really doubt that they&#8217;re going to find any compelling evidence on their show though. Their investigations in areas seem to be too short to find anything. Some of the areas they&#8217;re in are sometimes described as &#8220;very squatchy&#8221;. In one particular place they commented that if anyone stayed there for a longer period of time, evidence would certainly be found. My first thought was: &#8220;then why don&#8217;t you?!&#8221;.</p>
<p>Something I&#8217;ve wondered about is why they think Sasquatches would let themselves be caught by a few people tramping through the woods. Surely any squatch would hear them coming from a long way off and find a place to hide or simply move to a different location.</p>
<p>Another thought that struck me while watching an episode where they firmly believed that they had heard a Sasquatch howl back at them from a mountain across the vale. Why wouldn&#8217;t it be a fellow squatcher? If they go out at night and howl into the woods, surely other people do as well. I always imagine it as two groups of squatchers howling at each other and getting all excited about the responses they get, not realizing it&#8217;s people on the other end of the howl!</p>
<p>The only time I&#8217;ve come close to believing they were on to something was an episode where Ranae (the skeptic/ non-believer) got a little spooked about what she thought was eye shine. The thing that did it for me, was the way she casually asked Cliff what eye shine looked like and when Cliff confirmed it looked like a sort of green glow, only then did she speak up and let him know that she thought she saw eye shine behind a tree. It looked obvious that the situation spooked Ranae. She started talking quite a lot and Cliff had to shush her: &#8220;Shh, shh, we&#8217;re still trying to listen!&#8221;. When they went to investigate and moved in closer it sounded as if a big rock got thrown at them. It could have well been a &#8220;that&#8217;s close enough&#8221; warning.</p>
<p>Fake or real? Who knows&#8230; All I know is that I&#8217;ll be more than happy watching a new season of Finding Bigfoot even though I already know that they won&#8217;t find any Squatches. Because if they had found something, it would have been on the news long before the episodes aired on TV!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2012/04/29/i-do-think-theres-a-squatch-in-these-woods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Character selection mod for Skyrim; part 2</title>
		<link>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-2/</link>
		<comments>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-2/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 10:53:33 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Skyrim]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1658</guid>
		<description><![CDATA[If you&#8217;ve read this and think you can make this, please feel free to leave a comment or contact me directly. I might even be willing to donate a little something if it&#8217;s working as intended! Goals The main goal of this mod will be to implement character selection with a minimum set of changes [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve read this and think you can make this, please feel free to leave a comment or <a title="Contact" href="http://www.storminajar.net/contact/">contact</a> me directly. I might even be willing to donate a little something if it&#8217;s working as intended!</p>
<p><strong>Goals</strong></p>
<p>The main goal of this mod will be to implement character selection with a minimum set of changes to the default UI:</p>
<ul>
<li>Have a character selection screen when pressing &#8220;continue&#8221; in the main menu.</li>
<li>Have a categorized view of available save games when pressing &#8220;load game&#8221; in the main menu.</li>
<li>Only show relevant saved games for character when pressing &#8220;load game&#8221; in the ingame menu.</li>
<li>Only show relevant saved games for character when pressing &#8220;save game&#8221; in the ingame menu.</li>
</ul>
<p><span style="text-decoration: underline;"><strong><span id="more-1658"></span>Main menu</strong></span></p>
<p><strong>Continue game<br />
</strong></p>
<p><strong></strong>When continuing a game from the main menu a new submenu will allow the user to select a character. This will load the most recently saved game for that particular character.</p>
<p>The character list is sorted alphabetically on the name of the character.</p>
<div id="attachment_1668" class="wp-caption alignnone" style="width: 561px"><a href="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_continue.jpg" rel="lightbox[1658]"><img class=" wp-image-1668 " title="skyrim_cs_main_continue" src="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_continue.jpg" alt="" width="551" height="344" /></a><p class="wp-caption-text">Continue game: character selection</p></div>
<p>The above screenshot shows the menu that would appear when continuing a game.</p>
<div id="attachment_1669" class="wp-caption alignnone" style="width: 569px"><a href="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_continue_2.jpg" rel="lightbox[1658]"><img class=" wp-image-1669 " title="skyrim_cs_main_continue_2" src="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_continue_2.jpg" alt="" width="559" height="349" /></a><p class="wp-caption-text">Continue game: different character selected.</p></div>
<p>As you can see, when selecting a different character the screenshot changes to the latest saved game for that particular character.</p>
<p><strong>Load game<br />
</strong></p>
<p><strong></strong>When loading an existing save game a full list is shown, but grouped by character name. This makes it easier to find saved games related to different characters.</p>
<div id="attachment_1670" class="wp-caption alignnone" style="width: 570px"><a href="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_load.jpg" rel="lightbox[1658]"><img class=" wp-image-1670 " title="skyrim_cs_main_load" src="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_main_load.jpg" alt="" width="560" height="350" /></a><p class="wp-caption-text">Main menu: load game grouped by character</p></div>
<p><strong><span style="text-decoration: underline;">Ingame menu</span></strong></p>
<p><strong>Load game</strong></p>
<p><strong></strong>When loading a previously saved game from the ingame loading menu, the player will only be able to choose from saved games related to his current character. All other existing save games for other characters will be filtered out of this menu.</p>
<div id="attachment_1666" class="wp-caption alignnone" style="width: 570px"><a href="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_ingame_load.jpg" rel="lightbox[1658]"><img class=" wp-image-1666 " title="skyrim_cs_ingame_load" src="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_ingame_load.jpg" alt="" width="560" height="350" /></a><p class="wp-caption-text">Ingame menu: load game</p></div>
<p><strong>Save game</strong></p>
<p><strong></strong>For saving a game, the same needs to apply as for loading games. The save game menu only shows save games related to the currently selected character and filters out all the other possible save games.</p>
<div id="attachment_1667" class="wp-caption alignnone" style="width: 570px"><a href="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_ingame_save.jpg" rel="lightbox[1658]"><img class=" wp-image-1667 " title="skyrim_cs_ingame_save" src="http://www.storminajar.net/wp-content/uploads/2012/04/skyrim_cs_ingame_save.jpg" alt="" width="560" height="350" /></a><p class="wp-caption-text">Ingame menu: save game</p></div>
<p><strong>Switching character</strong></p>
<p><strong></strong>To switch to a different character nothing needs to be done. Simply select quit from the ingame menu and return to the main menu. Now a different character can be selected by chosing to continue a game as described earlier in this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Character selection mod for Skyrim; part 1</title>
		<link>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-1/</link>
		<comments>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-1/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 10:11:40 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Skyrim]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1651</guid>
		<description><![CDATA[It&#8217;s been a little while since I&#8217;ve made any posts and it happened to be about Skyrim as well. It might look like I&#8217;ve done nothing but play Skyrim, but I&#8217;ve had a very busy period at the office and didn&#8217;t really feel like writing anything on my blog. Ever since I first played Skyrim, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a little while since I&#8217;ve made any posts and it happened to be about Skyrim as well. It might look like I&#8217;ve done nothing but play Skyrim, but I&#8217;ve had a very busy period at the office and didn&#8217;t really feel like writing anything on my blog.</p>
<p>Ever since I first played Skyrim, I&#8217;ve been rather annoyed by the savegame system. I like to play different on different characters and it&#8217;s rather annoying to keep track of all the savegames of different characters as it&#8217;s just one long list in the interface.</p>
<p>I&#8217;ve been keeping my eye on the Steam Workshop and other mod sites hoping that there would be a mod that changes the UI to have something like character selections. Sadly, I&#8217;ve found no such thing so far. I figured that I could build something myself with the Creation Kit, but to this date I haven&#8217;t found out how and if it&#8217;s possible. I have seen plenty of mods changing the UI, so surely it must be possible.</p>
<p>I&#8217;ve written a small document outlining the concept of my ideas how to incorporate character selections within Skyrim. I have even included mock up screenshots to show how it could fit seamlessly into the default UI.</p>
<p><a title="Character selection mod for Skyrim; part 2" href="http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-2/">Find out more in part 2.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2012/04/28/character-selection-mod-for-skyrim-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skyrim mod: Riverwood farmhouse</title>
		<link>http://www.storminajar.net/2012/02/29/skyrim-mod-riverwood-farmhouse/</link>
		<comments>http://www.storminajar.net/2012/02/29/skyrim-mod-riverwood-farmhouse/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 18:47:49 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[XBOX 360]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Skyrim]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1639</guid>
		<description><![CDATA[Ever since the Creation Kit for Skyrim has been released, I&#8217;ve wanted to create a mod of my own. My ultimate goal would be to create a mod that implements a sort of character selection into the game, instead of the unorganized mess of save games that we get by default. However, I discovered that [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since the Creation Kit for Skyrim has been released, I&#8217;ve wanted to create a mod of my own. My ultimate goal would be to create a mod that implements a sort of character selection into the game, instead of the unorganized mess of save games that we get by default.</p>
<p>However, I discovered that the editor is quite complex and after some experimental hours I decided that this goal required a lot more knowledge than I possessed. I settled on a more simple idea to familiarize myself with the Creation Kit&#8230; to create a tiny playerhouse in Riverwood. This house would provide the bare essentials, such as: a place to sleep and cook, a chest to store stuff in.</p>
<p><a href="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_editor1.jpg" rel="lightbox[1639]"><img class="alignnone size-large wp-image-1635" title="Riverwood farmhouse location, editor mode." src="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_editor1-1024x624.jpg" alt="" width="600" height="365" /></a></p>
<p><span id="more-1639"></span>All is progressing surprisingly well! I&#8217;ve created a house and I managed to clear up some space in Riverwood to add my new, cosy home. It took me a little while to decorate the farmhouse, but I&#8217;m fairly satisfied with it. I also discovered what NavMeshes are for after my follower refused to enter my new home!</p>
<p><a href="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_editor2.jpg" rel="lightbox[1639]"><img class="alignnone size-large wp-image-1636" title="Riverwood farmhouse interior, editor mode." src="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_editor2-1024x624.jpg" alt="" width="600" height="365" /></a></p>
<p>Keeping in mind that I intended this house as a very simple starting house for new players, I figured it would be quite awesome if the player had to complete a few simple quests to obtain the key to the house. This is where it started to get a little daunting. I wanted to create a brand new character, located in the Riverwood inn, to give the player a quest and eventually (after completing the quests) give the key to the player.</p>
<p>Apparently there&#8217;s a little bug in the Creation Kit, it seems to mess up  the faces of newly added, or modified, NPC&#8217;s. The face would have an ugly grey skin tone, while the rest of the body looks as it is supposed to. The work around for this bug is awesome&#8230; after exporting the face data, I had to change the weight of the NPC ingame to zero and then back to the original value&#8230; How on earth this affects the skintone of faces is beyond me. But, hey&#8230; it works now!</p>
<p><a href="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_ingame1.jpg" rel="lightbox[1639]"><img class="alignnone size-large wp-image-1637" title="Meet Elemmuire, a brand new, faithful companion!" src="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_ingame1-1024x640.jpg" alt="" width="600" height="375" /></a></p>
<p>I&#8217;ve not created the quests yet as it seems like a complex thing to do. I&#8217;ve watched a few video tutorials to get me started, so I should be able to make a few quests soon. There&#8217;s one thing I don&#8217;t quite understand yet and that puts me off of making quests&#8230; spoken dialog.</p>
<p>In the editor a default voice can be specified for a character. That way a few things are given for free. The new character will be able to say all the default lines of speech. But, for new quests, audio needs to be recorded so the character can speak to you. Wouldn&#8217;t that cause me to end up with a character that speak in two different voice? One for my newly added quests, and the default voice for all the other things the character can say? Perhaps I&#8217;ll have to figure this out by simply getting started&#8230;</p>
<p>For now, a poor soul has died in the woods surrounding Riverwood. The key to the farmhouse can be looted from her body until I figure out what to do about these custom quests!</p>
<p><a href="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_ingame2.jpg" rel="lightbox[1639]"><img class="alignnone size-large wp-image-1638" title="Key to the Riverwood farmhouse." src="http://www.storminajar.net/wp-content/uploads/2012/02/skyrim_rwf_ingame2-1024x640.jpg" alt="" width="600" height="375" /></a></p>
<p>Hopefully I&#8217;ll be able to put this mod in the Steam Workshop soon! Although, soon is rather relative, since I only work on this in the weekend&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2012/02/29/skyrim-mod-riverwood-farmhouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Supporting multiple databases using the Unit of Work and Repository patterns</title>
		<link>http://www.storminajar.net/2011/12/13/supporting-multiple-databases-using-the-unit-of-work-and-repository-patterns/</link>
		<comments>http://www.storminajar.net/2011/12/13/supporting-multiple-databases-using-the-unit-of-work-and-repository-patterns/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 12:46:26 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Unit of Work]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1597</guid>
		<description><![CDATA[You might have read my previous entries about the Unit of Work and Repository design patterns. If not, you might want to check them out before reading the rest of this article. Unit of Work &#38; Repository support for multiple frameworks Letting your Unit of Work &#38; Repositories support multiple frameworks A little while ago, [...]]]></description>
			<content:encoded><![CDATA[<p>You might have read my previous entries about the Unit of Work and Repository design patterns. If not, you might want to check them out before reading the rest of this article.</p>
<ul>
<li><a title="Unit of Work &amp; Repository support for multiple frameworks, part 2" href="http://www.storminajar.net/2011/03/13/unit-of-work-repository-support-for-multiple-frameworks-part-2/" target="_blank">Unit of Work &amp; Repository support for multiple frameworks</a></li>
<li><a title="Letting your UnitOfWork &amp; Repositories support multiple frameworks" href="http://www.storminajar.net/2010/08/30/letting-your-unitofwork-repositories-support-multiple-frameworks/" target="_blank">Letting your Unit of Work &amp; Repositories support multiple frameworks</a></li>
</ul>
<p>A little while ago, I had to redesign the Unit of Work and Repository structure in a project at work. Naturally, I was quite happy to do so, as I have done a lot of research and development work on this topic already.</p>
<p><span id="more-1597"></span></p>
<p>A requirement was that the unit of work should be able to work with multiple databases. I figured that the generic approach as described in my previous articles would work just as well to solve this issue. I was rather pleased when I discovered that the sample code, provided as download in one of my previous articles, worked with only a few modifications.</p>
<p>Another thing of beauty &#8211; which is slightly off-topic, but deserves to be mentioned &#8211; was to see the code working through a different <em>inversion of control container</em>. My code always used Castle Windsor for IoC and DI, but the project at work uses StructureMap. I had a little <em>nerdgasm</em> when I saw my code working in a completely different environment; it really gave me the feeling that I had written some very versatile code that can be implemented in different scenarios with very little effort!</p>
<p>On to the actual code now&#8230;</p>
<p>The project uses Entity Framework 4.1 and has no requirements to support different ORM tools. This allowed me to make a few minor code changes to facilitate EF 4.1 a little better.</p>
<p>Let&#8217;s start with the unit of work interface:</p>
<pre class="brush:csharp">
public interface IUnitOfWork : IDisposable
{
    void Commit();
}

/// &lt;summary&gt;
/// Generic unit of work interface for different DbContext objects.
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// Keyword "out" is specified for the generic parameter
/// to allow casting (covariance).
/// &lt;/remarks&gt;
/// &lt;typeparam name="TContext"&gt;Concrete DbContext type.&lt;/typeparam&gt;
public interface IUnitOfWork&lt;out TContext&gt; : IUnitOfWork
   where TContext : DbContext
{
    TContext Context { get; }
}
</pre>
<p>Very little changes in the code here. An out-keyword was added to the generic TContext parameter and an added restriction that TContext should always be of type DbContext (Entity Framework 4.1 specific change).</p>
<p>The only other change was done in the abstract Repository class:</p>
<pre class="brush:csharp">
public abstract class Repository&lt;TEntity&gt; : IRepository&lt;TEntity&gt;
    where TEntity : class
{
    private IUnitOfWork&lt;DbContext&gt; unitOfWork;
    private readonly IDbSet&lt;TEntity&gt; entitySet;

    /// &lt;summary&gt;
    /// Creates a new repository.
    /// &lt;/summary&gt;
    /// &lt;param name="unitOfWork"&gt;The unit of work to use.&lt;/param&gt;
    public Repository(IUnitOfWork unitOfWork)
    {
        this.unitOfWork = (IUnitOfWork&lt;DbContext&gt;)unitOfWork;
        this.entitySet = this.unitOfWork.Context.Set&lt;TEntity&gt;();
    }
}
</pre>
<p>This code was modified to be able to cast the IUnitOfWork to an IUnitOfWork&lt;DbContext&gt;. This is another change specific for EF 4.1 to allow me to access the context and create an entity set.</p>
<p>And finally, the StructureMap registries tie everything together when bootstrapping the application:</p>
<pre class="brush:csharp">
    ForConcreteType&lt;ConcreteContext&gt;();

    ForConcreteType&lt;AnotherConcreteContext&gt;();

    ForConcreteType&lt;UnitOfWork&lt;ConcreteContext&gt;&gt;()
        .Configure
        .Ctor&lt;ConcreteContext&gt;();

    ForConcreteType&lt;UnitOfWork&lt;AnotherConcreteContext&gt;&gt;()
        .Configure
        .Ctor&lt;AnotherConcreteContext&gt;();

    For&lt;ISomeRepository&gt;()
        .Use&lt;SomeRepository&gt;()
        .Ctor&lt;IUnitOfWork&gt;()
        .Is&lt;UnitOfWork&lt;ConcreteContext&gt;&gt;();

    For&lt;IOtherRepository&gt;()
        .Use&lt;OtherRepository&gt;()
        .Ctor&lt;IUnitOfWork&gt;()
        .Is&lt;UnitOfWork&lt;AnotherConcreteContext&gt;&gt;();
</pre>
<p>I&#8217;m not an expert on StructureMap, so I&#8217;m not sure if this is the most efficient way to go, but here I define the concrete context objects for the databases as well as which context to use when initializing the repositories.</p>
<p>Hopefully this, combined with my previous posts, is enough to let you figure out the total picture on your own. If there actually is demand for another sample project, let me know in the comments and I&#8217;ll see if I can free up some time to make one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/12/13/supporting-multiple-databases-using-the-unit-of-work-and-repository-patterns/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dragonborn</title>
		<link>http://www.storminajar.net/2011/11/22/dragonborn/</link>
		<comments>http://www.storminajar.net/2011/11/22/dragonborn/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 11:21:13 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Skyrim]]></category>
		<category><![CDATA[The Elder Scrolls]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1577</guid>
		<description><![CDATA[Every gamer must have heard about Skyrim by now. Is it really as good as everyone says? I&#8217;ve been playing it for a little while now and, in my opinion, YES! It&#8217;s absolutely amazing&#8230; however, it has plenty of little annoyances. Everywhere on the web you&#8217;ll be able to read about all the fantastic parts [...]]]></description>
			<content:encoded><![CDATA[<p>Every gamer must have heard about Skyrim by now. Is it really as good as everyone says? I&#8217;ve been playing it for a little while now and, in my opinion, YES! It&#8217;s absolutely amazing&#8230; however, it has plenty of little annoyances.</p>
<p>Everywhere on the web you&#8217;ll be able to read about all the fantastic parts of Skyrim, so I&#8217;ll be focusing on not so nice parts of this game.</p>
<p>The interface is not intuitive at all. I&#8217;ve read that it&#8217;s slightly better on consoles, though not by much. It looks extremely elegant and clean, but it takes a lot of getting used to. The mouse cannot be used in most menus and everything will need to be done by keyboard. Which isn&#8217;t all <em>that</em> bad though&#8230; once I got the hang of the flow through the menus it works alright, but it&#8217;s a long and bumpy road to actually understand it.</p>
<p><span id="more-1577"></span></p>
<p>In my first hours of playing Skyrim, I truly struggled with the interface:</p>
<ul>
<li>How exactly do I know which gear I&#8217;ve got equipped? I&#8217;m not able to see my character!</li>
<li>Why on earth are my miscellaneous quests not tracked on the map? &#8230;the fuck?!</li>
<li>What in the love of all that is holy do I need to do to be able to use my newly earned shout?! Stop telling me I need a dragon soul, I have one <em>damn it!</em></li>
<li>Generally it lacks explanation and the player is left on its own to figure out all the possibilities.</li>
</ul>
<p>Another part I truly do not like are the controls of my horse. The amount of times that I accidentally fell off a cliff because the horse seemingly had a mind of its own is not funny. A hint for any future Skyrim players&#8230; never ever walk your horse to the edge of a cliff and assume you can walk backwards to back away from it. Maybe I&#8217;ve played Word of Warcraft for too long to expect my mount to just walk backwards.</p>
<p>The AI pathing seems to lack quite a bit of&#8230; intelligence as well. The amount of times that I&#8217;ve lost a companion in the woods somewhere can not be counted on both of my hands. Either they randomly run off the road to stand around in the woods for a while before deciding to get back to the road and follow me or simply wait somewhere until I return and fetch them.</p>
<p>They also do not like climbing rocks either&#8230; where I (and I suspect many other players) simply jump onto some rocks, the AI decides to run off searching for a proper path there. This caused such enormous frustration at one point when I was trekking through the wilderness&#8230;</p>
<p>All in all, while these things really <em>are</em> annoying&#8230; it&#8217;s not such a huge deal that the game itself isn&#8217;t enjoyable. At the moment I&#8217;m even favouring to play Skyrim over Assassin&#8217;s Creed: Revelations. For me, as a true AC fanboi, is quite stunning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/11/22/dragonborn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Featured posts!</title>
		<link>http://www.storminajar.net/2011/11/16/featured-posts/</link>
		<comments>http://www.storminajar.net/2011/11/16/featured-posts/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 20:59:17 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Storm in a Jar]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1567</guid>
		<description><![CDATA[I finally found my way through the many plugins available to create sweet looking featured posts sections. After a lot of searching and tweaking I finally found one that, admittedly, after some customization of both theme and plugin files, works just as I originally had in mind! Awesome! From today the front page of the [...]]]></description>
			<content:encoded><![CDATA[<p>I finally found my way through the many plugins available to create sweet looking featured posts sections. After a lot of searching and tweaking I finally found one that, admittedly, after some customization of both theme and plugin files, works just as I originally had in mind! Awesome!</p>
<p>From today the front page of the website has a little rotating banner showing posts that I think are important for my audience. Or generally posts that required a lot of work and research and simply deserve to be in the spotlight!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/11/16/featured-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding a new identity</title>
		<link>http://www.storminajar.net/2011/11/14/finding-a-new-identity/</link>
		<comments>http://www.storminajar.net/2011/11/14/finding-a-new-identity/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 10:57:07 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Storm in a Jar]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1543</guid>
		<description><![CDATA[Storm in a Jar has been going through a bit of an identity crisis recently. It changed webhost twice in a very short time and it has been given a new look multiple times in the same period as well. My shortcomings as a designer (that&#8217;s probably the reason why I&#8217;m a software engineer&#8230;) have [...]]]></description>
			<content:encoded><![CDATA[<p>Storm in a Jar has been going through a bit of an identity crisis recently. It changed webhost twice in a very short time and it has been given a new look multiple times in the same period as well.</p>
<p>My shortcomings as a designer (that&#8217;s probably the reason why I&#8217;m a software engineer&#8230;) have been glaringly obvious to me. I had the hardest time ever to make the website appear as I had in mind. I wanted to modernize the layout and have a nice, clean look with clear typography. I think I succeeded quite well there, but it was a bumpy road to find my way through the jungle of WordPress themes!</p>
<p><span id="more-1543"></span>The other thing I&#8217;m getting increasingly frustrated with is finding the right plugin to create a fancy featured post slider on the frontpage. Again, there are so many plugins to choose from. Sadly though, many of them are either incompatible with the latest WordPress version or behave slightly different from what I&#8217;d like. Or&#8230; to make matters worse, behave exactly like it want, but aren&#8217;t customizable enough to make it look the way I originally intended.</p>
<p>The hunt continues&#8230; hopefully I&#8217;ll find an appropriate solution soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/11/14/finding-a-new-identity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rediscovering Telerik</title>
		<link>http://www.storminajar.net/2011/08/22/rediscovering-telerik/</link>
		<comments>http://www.storminajar.net/2011/08/22/rediscovering-telerik/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 08:26:37 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Telerik]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1448</guid>
		<description><![CDATA[I&#8217;ve recently switched to a new employer and only now I realize how much I loved working with the Telerik&#8216;s product suite. I no longer have access to all the goodies Telerik offers. My previous two employers had licenses for either the Ultimate Collection for .NET or just the ASP.NET AJAX components. That&#8217;s roughly five [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently switched to a new employer and only now I realize how much I loved working with the <a href="http://www.telerik.com" target="_blank">Telerik</a>&#8216;s product suite. I no longer have access to all the goodies Telerik offers. My previous two employers had licenses for either the Ultimate Collection for .NET or just the ASP.NET AJAX components. That&#8217;s roughly five to six years of developing in .NET, with Telerik components! Trust me, it&#8217;s rather unpleasant having to revert back to default controls!</p>
<p>From this point of view I looked at Telerik again. What can they still offer me at this point, since I can&#8217;t afford to buy any licenses. In fact, I was pleasantly surprised! I knew they had some free tools, but I never quite realized which. I already knew of <a href="http://www.telerik.com/products/decompiler.aspx" target="_blank">JustDecompile</a> and the <a href="http://www.telerik.com/products/aspnet-mvc.aspx" target="_blank">ASP.NET MVC components</a>. To my delight, I discovered a free version of <a href="http://www.telerik.com/products/orm/free.aspx" target="_blank">OpenAccess ORM</a>! I will admit that this severely limits the toolbox that I got used to, but it&#8217;s still a pretty awesome toolbox to use.</p>
<p><span id="more-1448"></span>A free version of OpenAccess is just a godsend! Due to previously bad experiences with Entity Framework, I didn&#8217;t want to go back to using that. Nor did I want to continue using NHibernate, even though it can do everything I can possibly think of&#8230; it&#8217;s always a pain in the backside to actually get it done. Sure, OpenAccess has it&#8217;s quirks and limitations, but at least there&#8217;s a company supporting their product actively and let&#8217;s not forget about the community contributions!</p>
<p>I don&#8217;t have much experience developing with the <a href="http://www.asp.net/mvc" target="_blank">ASP.NET MVC framework</a>, but knowing that Telerik&#8217;s controls are free to use might make me look into this option. I quite like the looks of MVC3 with the Razor view engine; it&#8217;s lifted a few of my main objections to working with the MVC framework. So, again&#8230; here I have an opportunity to continue to build applications with the help of an awesome control suite.</p>
<p>In fact, not having access to all the goodies that I&#8217;ve used for all these years might make me a better developer! I&#8217;m forced to reconsider my options and perhaps learn new techniques and start using those.</p>
<p>My thanks to the Telerik team: you&#8217;re not just pushing yourselves with every release, but pushing me as well to stay on top of my game! Continue the awesome work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/08/22/rediscovering-telerik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There&#8217;s still some activity!</title>
		<link>http://www.storminajar.net/2011/08/07/theres-still-some-activity/</link>
		<comments>http://www.storminajar.net/2011/08/07/theres-still-some-activity/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 12:55:23 +0000</pubDate>
		<dc:creator>RJonestorm</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.storminajar.net/?p=1423</guid>
		<description><![CDATA[Yes, my dear readers (do I actually have any?!), I&#8217;m still around! It&#8217;s been a little quiet from me lately, but I have a fairly busy amount of weeks behind me. Not only do I have a new employer, but a lot of my free time has been taken up by garden work! On a [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, my dear readers (do I actually have any?!), I&#8217;m still around! It&#8217;s been a little quiet from me lately, but I have a fairly busy amount of weeks behind me. Not only do I have a new employer, but a lot of my free time has been taken up by garden work! On a happier note, during all this time, I got some ideas for new posts and other features for the website&#8230; so stay tuned!</p>
<p>The garden has been a bit of a mess ever since I got to live in my new house. I knew I had to get my bum in gear at some point to tidy it up and make it look presentable. It all started with a bright idea to tidy up the pond first. It was just yucky, dirty, brown water and probably a nice little breeding place for all sorts of insects. Once done with the pond, I decided that the hedge on one side of the garden took up far too much space and should be taken out completely. What followed was a tiny nightmare, really.</p>
<p><span id="more-1423"></span>The previous owners had simply let the hedge grow wildly along almost the entire length of the garden. When removing the hedge, an old, cracked and sagged concrete fence was revealed. In fact, the hedge was supporting the fence, so we couldn&#8217;t remove the hedge without breaking down the fence as well. Further down the garden an old, wooden fence was revealed that fell apart at the merest touch! After having a chat with the neighbours we concluded that the concrete fence must have been at least fifty(!) years old. Now I found myself in a situation where my garden was an absolute disgrace. I was looking at broken fences, riddled with remains of the hedge that was still holding it together. The fences had to be removed and replaced with an entirely new fence. Ouch! Quite an unexpected expense there. After contacting a company to take care of my horrible fences, work continued on the garden. All plants, small trees and grass was removed. Now my garden look at it worst. Now I had not only broken fences, but a bare patch of soil and mud as well.</p>
<p>Luckily, a new fence could be placed in just a few weeks time and that opened up the road to start building up the garden again. It was still a lot of work though. I had far too much soil in my garden and it was spread in bumps and lumps all over my garden. I had at least five wheelbarrows of soil that I had to get rid of! Thankfully, my neighbours told me they needed soil for their garden and I was able to provide them with seven wheelbarrows full of it! Now I could make a path in my garden, fill it up with gravel and place artificial grass on both sides of it.</p>
<p>It was such a relief to have a decent looking garden again. It&#8217;s not done yet, unfortunately. I still need a patch of artificial grass and some additional gravel. Oh, and guess what&#8230; the pond still needs doing as well. The bloody pond that started it all is still not done!</p>
<p>This is turning into a multi-weekend project. Thankfully my family has been a great help with all the hard work and hopefully in the upcoming weeks it will all pay off when it&#8217;s completely done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.storminajar.net/2011/08/07/theres-still-some-activity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

