Setup CQRS¶
The fluent configuration API makes it easy to set up CQRS.
NOTE
To setup CQRS, the NuGet package “CrystalSharp” must be installed.
IResolver resolver = CrystalSharpAdapter.New(services)
.AddCqrs(typeof(CreateEmployeeCommandHandler))
.CreateResolver();
AddCqrs(typeof(CreateEmployeeCommandHandler))
scans the assembly where handlers reside and registers them.