Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorator registration is not working with Autofac 6.x #36

Open
junaidahmed92 opened this issue Jun 11, 2021 · 1 comment
Open

Decorator registration is not working with Autofac 6.x #36

junaidahmed92 opened this issue Jun 11, 2021 · 1 comment

Comments

@junaidahmed92
Copy link

junaidahmed92 commented Jun 11, 2021

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
autofac/Autofac#1098
kgrzybek/modular-monolith-with-ddd#68

Can you explain how can we solve this issue with latest version of Autofac?

@LeftTwixWand
Copy link

I've created a sample app to demonstrate Requests processing in the latest Autofac & MediatR versions:
github.com/LeftTwixWand/ModernCQRS

The sample output:
CQRS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants