tags

circular dependency

Lazily resolving services to fix circular dependencies in .NET Core

The problem with circular dependencies When building an application, good design dictates that you should avoid circular dependencies between your services. A circular dependency is when some components depend on each other, directly or indirectly, e.g. A depends on B which depends on C which depends on A: It is generally agreed that this should be avoided; I won't go into the details of the conceptual and theoretical reasons, because there are plenty of resources about it on the web.