Can you use CQRS pattern without MediatR or reflection ?
You can🤩
C# and dependency injection container is all you need
@oskar_at_net created 2 blog post and gave 2 talks about this. Power and credits to him🤘👨🎤
At first you need to create these interfaces. Then👇
#dotnet
Then you create auxiliary extension methods that allow you to easily add Query and Command classes that implement these interfaces to Dependency injection container
Here is the code for AddCommandHandler extension method
Jan 25, 2022 • 6 tweets • 3 min read
Let's see🤔
How can you control life cycle of injected elements in ASP..NET Core DI Container?
We have three live cycles:
➡️ Singleton
➡️ Scoped
➡️ Transient
How do they work? Here is the thread 🧵👇 with the demo and code