24 Dec
2009

If (Successful) { throw new Exception(); }

So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.  After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?  Now, of course, I am assuming this is intentional and is transmitting […]

Read More
22 Dec
2009

Powershell: Load assembly without locking file.

I have a set of PowerShell build scripts and ran into a case where I needed to load an assembly (to get the assembly?s version) and still (at a later time) work with the assembly file on disk. A typical way to load an assembly within PowerShell is to use the Assembly.LoadFrom(filePath) # Powershell [System.Reflection.Assembly]::LoadFrom($assemblyPath) […]

Read More
18 Dec
2009

Advanced Unity: Connecting Implementations to Open Generic Types

Jimmy Bogard has an excellent post called “Advanced StructureMap: connecting implementations to open generic types” which he uses the StructureMap IOC container to connect messages to handlers. This is something I have been using in my codebase to handle domain events, as well as a publish/subscribe mechanism for WCF message handling. I learned about this […]

Read More
15 Dec
2009

Unity Extension for Entity Framework POCO Configuration, Repository and Unit of Work

In my previous two posts I talk about simple EF4 mappings and some common abstractions I like to work with for my entity persistence operations. In this post I want to take all of the setup code necessary for EF configuration and registration and encapsulate it along with the standard boiler plate IOC container code […]

Read More
15 Dec
2009

Entity Framework POCO (EF4): Generic Repository and Unit of Work Prototype

In my previous post I demonstrated how to create a simple mapping using the latest EF4 CTP. In this post I will look at how I can customize some infrastructure code in an attempt to align EF POCO ?Code Only? with existing patterns, while potentially increasing reuse and testability. A popular pattern for ORM data […]

Read More