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

Part 3 – Web Farm Example (Docker, Redis Cache, Haproxy, .Net Core Web API)

In this last article, I will add haproxy to project to load balancing. To add haproxy to project, first I will add a file that named haproxy.cfg to configure the haproxy. Continue reading

#net-core, #docker, #haproxy, #redis-cache, #web-api, #web-farm

Part 2 – Web Farm Example (Docker, Redis Cache, Haproxy, .Net Core Web API)

In this article, I will add redis cache to web farm project. To do this I added redis configurations to docker-compose.yml. Latest version of the file is looking like following. Continue reading

#net-core, #docker, #haproxy, #redis-cache, #web-api, #web-farm

Part 1 – Web Farm Example (Docker, Redis Cache, Haproxy, .Net Core Web API)

In these article series, I will try to create a web farm sample step by step. In this sample, there will be a web api project as a web server (.net core framework) and a load balancer (haproxy). I will reproduce the web api to test load balancer. These web api projects will use the same cache server(redis) to sharing data. Finally, I will simulate this web farm on docker. Continue reading

#net-core, #docker, #haproxy, #redis-cache, #web-api, #web-farm