Posts tagged structuremap

There are 4 posts for the tag structuremap

Dependency injection in ASP.NET MVC 3 got a lot simpler

In my project of writing my own blog engine, I’m using ASP.NET MVC 3 beta, and I like what they have done to simplify the dependency injection! Let me show you the difference. The MVC 2 way First, I need a registry (that’s just ScructureMap, nothing really to do with MVC). //The most simple registry I could think of public class AlphaRegistry : Registry { public AlphaRegistry() { Scan( x => { x.AssembliesFromApplicationBaseDirectory(); x.With...

Posted by johan on October 30, 2010

Unit testing saving pages in EPiServer CMS 6

I’ve been working quite a lot with EPiServer in the last six years or so, and unit testing has always been a pain in the ass (not that I was writing unit tests anyway six years ago, I hardly knew what I was doing back then… can’t believe I actually got paid! :-)). And it still is, even in the latest version. Luckily there are some EPiServer developers that are either smarter than me, or just have more free time, for example Joel Abrahamson who has created a wrapper project, EPiAbstractions, fo...

Posted by johan on August 11, 2010

Do NOT forget to close() your WCF ServiceClients!

We had a very disturbing problem today. Our client was doing acceptance testing on the application we’re building for them, and had assembled a team of 15 people to do it. The application ran smoothly, until after a few minutes it came to a grinding halt and simply stopped responding. We checked the server, and the CPU was fine. For a while, after a minute or so it went up to 100%. The application is an ASP.NET MVC web client, talking to WCF services, which are talking to an SQL Server. Everyth...

Posted by johan on March 16, 2010

Bleeding edge

Starting a new project at work today. For once this project will have to use the latest and greatest technology. We want to use the new Windows Workflow Foundation, which means that we have to use .NET 4 and Visual Studio 2010. We will also use ASP.NET MVC, and since we are using VS2010 beta 2, that means ASP.NET MVC 2 Preview 2. Nice! There are some difficulties, though. For example, we are planning to use StructureMap as for dependency injection, and since MvcContrib has a built-in Controller...

Posted by johan on November 09, 2009