-
-
Notifications
You must be signed in to change notification settings - Fork 12
Controllers CQRS
anton-martyniuk edited this page Sep 2, 2022
·
1 revision
Modern generic CQRS controllers use Modern CQRS Commands and Queries to perform CRUD operations.
To use CQRS Controller install the Modern.Controllers.CQRS.DataStore.DependencyInjection
Nuget package and register it within Modern builder in DI:
builder.Services
.AddModern()
.AddCqrsControllers(options =>
{
options.AddController<CreateRequest, UpdateRequest, AirplaneDto, AirplaneDbo, long>();
});
Specify the type of create and update requests, dto entity model and primary key.
Controller requires CQRS Commands and Queries to be registered: regular one or with caching.