-
-
Notifications
You must be signed in to change notification settings - Fork 11
CQRS without caching
anton-martyniuk edited this page Sep 2, 2022
·
1 revision
Modern generic CQRS consist of Commands and Queries which use Modern generic repositories to perform CRUD operations.
To use CQRS install the Modern.CQRS.DataStore.DependencyInjection
Nuget package and register it within Modern builder in DI:
builder.Services
.AddModern()
.AddCqrs(options =>
{
options.AddQueriesCommandsAndHandlersFor<AirplaneDto, AirplaneDbo, long, IModernRepository<AirplaneDbo, long>>();
});
Specify the type of Dto and dbo entity models, primary key and modern repository.
CQRS requires one of modern repositories to be registered.