Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Derek Comartin

Thread Safety & Scoped Lifetime in Dependency Injection Containers

If you’re using Scoped Lifetime in a Dependency Injection containers, beware! You may be run into race conditions due to a lack of thread safety. I was doing a live stream on Domain Events over on my YouTube Channel where I was taking advantage of Scoped Lifetime. After the stream, I realized Scoped Lifetime and thread safety isn’t mentioned much and I’m not sure why? It could be because developers aren’t using multiple threads within the top-level request (HTTP request or service bus message invocation). Or it’s because developers are writing thread-safe code by default. I tend to think it’s… Read More »Thread Safety & Scoped Lifetime in Dependency Injection Containers

NuGet Package Alternatives when Migrating to .NET Core

Migrating from .NET Framework to .NET Core requires all of your NuGet Package dependencies to also be compliant with .NET Core. But what happens when you find a dependency that only targets .NET Framework? Here are a few NuGet package alternatives that I’ve run into during my own migration. Migrating from .NET Framework to .NET Core This post is in a blog series for migrating from .NET Framework to .NET Core. Here’ are some earlier post if you need to catch up: Migrating from .NET Framework to .NET Core Overview Migrating to ASP.NET Core .NET Portability Analyzer Multi-Targeted NuGet Package… Read More »NuGet Package Alternatives when Migrating to .NET Core

Multi-Targeted NuGet Package Gotchas!

In order to migrate your application from .NET Framework to .NET Core, one part of the migration is making sure all of your dependencies via NuGet packages will work on .NET Core. Most packages nowadays are multi-targeted. Meaning they target various versions of .NET Framework, .NET Core, and .NET Standard. Here are a few of multi-targeted NuGet package gotchas that I’ve discovered in my own migration. Migrating from .NET Framework to .NET Core This post is in a blog series for migrating from .NET Framework to .NET Core. Here’ are some earlier post if you need to catch up: Migrating… Read More »Multi-Targeted NuGet Package Gotchas!