Episerver Dependency Injection

This section covers implementing inversion of control within Episerver.  If you want to create a well tested and flexible website, you need to read and understand the principles in this area.  Out-of-the-box Episerver uses structure map and if you are new to Epi and dependency injection I recommend using it.

RECOMMENDED READING

To get you started I would recommend reading this post firsr, Episerver Structure Map Guide.

A Very Simple Dependency Injection Technique For Episerver

Dependency injection and inversion of control are not new concepts in Episerver. From version 7 onwards, injecting the Episerver API has become a standard, which is great. I've talked about Structure map and Episerver many times before, if you want to know a bit more then I recommend reading, Episerver Structure Map Guide and Dependency […]

Dependency Injection In Episerver - ServiceLocator and Injected Explained

Dependency injection is a fairly standard computer science topic nowadays, but I still see a lot of confusion over how dependency injection works within Episerver. In today's guide, I'm going to cover the tools Episerver give us developers out the box and cover some of their pro's and con's. The ServiceLocator The ServiceLocator can be […]

Episerver Structure Map Guide

With the release of Episerver 7, having a good understanding about dependency injection is critical to making a successful project. Out of the box, Episerver uses structure map so you don't have to add it in. You will need to be able to configure it. This guide was written for Strucutre map 2, so you […]

EPiServer: Dependencies in Episerver Explained - Unit Testing Part 1

Trying to get 100% test coverage in your project is a noble goal.  With Episerver 7 onwards, unit testing is a lot more achievable.  In olden times, you may have a class that called the DataFactory to get some information from Episerver.  Doing this created a dependency to Episerver in your code.  When you came to […]