.NET & C# ยท ASP.NET Core
What is a common mistake with dependency injection lifetimes?
A common mistake is injecting a scoped service such as DbContext directly into a singleton, causing the shorter-lived dependency to be captured beyond its intended scope.