I'm using ASP.NET Core 3.1 / Autofac 6, and would like to configure a resolution pipeline middleware on a controller.
This is how I do it on a class I'm the owner of:
builder.RegisterType<MyService>().As<IMyService>().ConfigurePipeline(p => { /* */ });
However, when I do it on a controller, it doesn't work:
builder.RegisterType<WeatherForecastController>().AsSelf().ConfigurePipeline(...);
I know that the reason might be that I already have:
services.AddControllers();
but I'm not sure what to do about it. Any ideas?