Skip to content

Services without caching

anton-martyniuk edited this page Sep 2, 2022 · 1 revision

Modern generic services use Modern generic repositories to perform CRUD operations. To use Service install the Modern.Services.DataStore.DependencyInjection Nuget package and register it within Modern builder in DI:

builder.Services
    .AddModern()
    .AddServices(options =>
    {
        options.AddService<AirplaneDto, AirplaneDbo, long, IModernRepository<AirplaneDbo, long>>();
    });

Specify the type of Dto and dbo entity models, primary key and modern repository.
Service requires one of modern repositories to be registered.

Clone this wiki locally