Closed ejacobg closed 3 months ago
ChatGPT says returning void
will have the runtime use the built-in DI container instead?
public void ConfigureServices(IServiceCollection services)
{
services.AddAppInsight(Configuration)
.AddGrpc().Services
.AddCustomMVC(Configuration)
.AddCustomDbContext(Configuration)
.AddCustomOptions(Configuration)
.AddIntegrationServices(Configuration)
.AddEventBus(Configuration)
.AddSwagger(Configuration)
.AddCustomHealthCheck(Configuration);
}
Further reading:
I don't care about using Autofac right now.
From the Catalog API's
Startup.cs
:Related: https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting.istartup.configureservices?view=aspnetcore-8.0
Is this even correct usage of Autofac? The documentation seems to discourage doing this.