Part 3 – ASP.NET Core Dependency Injection


There is a pattern that uses custom options classes to represent a group of related settings. As usual, I will explain it with example. First, download Microsoft.Extensions.Options.dll from nuget. Continue reading

#net-core, #asp-net-core, #autofac, #castle-windsor, #dependency-injection, #service-collection, #service-provider

Part 2 – ASP.NET Core Dependency Injection

In this article, we will examine some of ASP.NET Core DI features with doing examples. Because, some of these features are more important to understand how this features are used in framework. Also, if we know this features, we can design our project with better design. Let’s start to examples. Continue reading

#net-core, #asp-net-core, #dependency-injection

Part 1 – ASP.NET Core Dependency Injection

In this article, I won’t explain what is dependency injection (DI). I will try to explain how DI in ASP.NET Core works what can we do with it and how we can use other DI containers (Autofac and Castle Windsor) with ASP.NET Core.ASP.NET Core provides a minimal feature set to use default services cotainer. But you want to use different DI containers, because DI in ASP.NET Core is vey primitive. For example, it dosn’t support property injection or advanced service registering methods. Continue reading

#net-core, #asp-net-core, #dependency-injection, #service-collection, #service-provider