Steve Talks Code
Coding thoughts about .NET
Blog posts relating to ASP.NET Core
Understanding Disposables In .NET Dependency Injection - Part 1
17 Nov 2020
In this post I will be discussing the traps that can catch you out by potentially creating memory leaks when registering types that implement the IDisposable interface as services with the out-of-the-box .NET Dependency Injection container.
Simplifying Dependency Injection with Functions over Interfaces
20 Jan 2020
This post shows how to apply functional programming techniques to dependency injection to simplify single method classes.
Getting Dependencies by Name or Key using the .NET Core Container (Part 2)
19 Jan 2020
This post describes how the use of custom typed delegates can be used to implement named or keyed dependency resolution using the Microsoft DI container that comes with .NET Core.
Getting Dependencies by Name or Key using the .NET Core Container (Part 1)
18 Jan 2020
In this post, I demonstrate how to use custom typed delegates to perform named/keyed dependency injection using the Microsoft Dependency Injection container in .NET core.
Clean Architecture - Should I Move the Startup Class to Another Assembly?
6 Jun 2018
In this post, I look at whether it is worth moving the dependency registrations in the Startup.cs class into its own assembly to maintain a clean code approach to the top level web application.
Using IConfigureOptions <TOptions> To Apply Changes to a Configuration
1 May 2018
In this post, I look at using the IConfigureOptions interface to apply changes to a configuration as an alternative to the bridge pattern I have described in previous posts.
Share this post
Recent Blog Posts
Could .NET Source Generator Attacks Be A Danger To Your Code?
Debugging C# Source Generators with Visual Studio 2019 16.10
JetBrains Dependency Injection Webinar
Using OpenApiReference To Generate Open API Client Code
Latest on Twitter
No results found
.NET Core (16)
ASP.NET Core (17)
C# 9 (5)
Clean Code (10)
Code Generation (3)
Continuous Integration and Deployments (1)
Dependency Injection (8)
Design Patterns (13)
Dev Ops (2)
Octopus Deploy (1)
Visual Studio (2)