23 11 2016
Although ASP.NET Core has built-in dependency injection and inversion of control support it is still possible to use DI components by other vendors. ASP.NET Core supports other containers through simple IServiceProvider interface. This blog post explains how to use other containers with ASP.NET Core and shows how to use Structuremap and Autofac with framework level dependency injection.
7 11 2016
Besides all other dependency injection forms, ASP.NET Core supports also view injection. Yes, it is possible to inject instances directly to views and there’s no need to update view models to carry information that is already available through dependency injection. This blog post demonstrates how to use view injection.
20 07 2016
On ASP.NET Core view components support dependency injection. We can use some DI/IoC container but we can also go with framework level dependency injection. This blog post explains how dependency injection works with view components and as an example I show you some code I’m using to build top menu for my demo site.
2 08 2015
ASP.NET 5 has dependcy injection available at framework level and ASP.NET 5 makes heavy use of it. Most of things surrounding controllers, views and other MVC components are implemented as services that web applications consume. This post is quick overview of dependency injection in ASP.NET 5 with some examples.
26 11 2010
I am using StructureMap as my IoC container. In my ASP.NET MVC web application I have controller factory based on StructureMap. I found interesting problem – when running my web application on development web server I get ArgumentNullException with every request to some controller action. In this posting I will describe why it is happening and how to avoid it.
21 09 2010
I made quick comparison of performance of four DI/IoC containers. I measured Unity,Castle Windsor, StructureMap and Ninject in two scenarios – resolving objects with empty constructor and resolving object with injected parameters in its constructor. Results are here.
5 04 2009
Tests tell us if our software works as expected. But they tell us almost nothing about side effects of technical environment where system lives. We can face different problems when test users start testing system in their environment and we want to be ready to react fast to all problems. To get information about system’s work we need advanced logging.
14 04 2008
I just putted up Unity behind my test project and had some troubles with singletons. There is some misleading information in documentation you should be aware of.