I am migrating an existing Web API project to .Net8 that has the DDD layers: Application, Domain and Infrastructure and implements the CQRS pattern (MediatR). I want to know if it’s worth using Autofac, I saw this library Autofac.WebApi2
but it’s not been touched for a long time now, maybe because it’s complete.
Can someone show me an example of programe.cs (Top-level Statements) that use/implement the library Autofac. Also, all my configurations are in the appsettings.json, after bindings the settings I do services.AddSingleton(externalServicesOptions.ExternalServices);
Even after reading the documentation of Autofac, I have no clue how I should plug things/modules together.
I’m trying to make things easy in the long run, but by adding the automation I have a feeling that I’m also adding complexity and latency.