sample-dotnet-core-cqrs-api
sample-dotnet-core-cqrs-api copied to clipboard
Decorator registration is not working with Autofac 6.x
Hi, I've implemented CQRS by following your repo. However I noticed that the decorator registration is now working with Autofac 6.x
builder.RegisterGenericDecorator( typeof(UnitOfWorkCommandHandlerWithResultDecorator<,>), typeof(ICommandHandler<,>));
I found different links on github with same issue but none of them really helps https://github.com/autofac/Autofac/issues/1098 https://github.com/kgrzybek/modular-monolith-with-ddd/issues/68
Can you explain how can we solve this issue with latest version of Autofac?
I've created a sample app to demonstrate Requests processing in the latest Autofac & MediatR versions: github.com/LeftTwixWand/ModernCQRS
The sample output:
