// Default implementation public static ISkorubaIdentityServerAdminBuilder AddSingleTenantConfiguration (this IServiceCollection services, IConfiguration configuration, IHostingEnvironment hostingEnvironment, ILogger logger, Action <DbContextOptionsBuilder> identityDbContextOptions, Action <ConfigurationStoreOptions> configurationStoreOptions, Action <OperationalStoreOptions> operationalStoreOptions, Action <DbContextOptionsBuilder> logDbContextOptions) { var builder = new SkorubaIdentityServerAdminBuilder(services); builder.Services.AddCustomConfiguration <AdminIdentityDbContext, IdentityServerConfigurationDbContext, IdentityServerPersistedGrantDbContext, AdminLogDbContext> (configuration, hostingEnvironment, logger, identityDbContextOptions, configurationStoreOptions, operationalStoreOptions, logDbContextOptions); return(builder); }
// Generic implementation public static ISkorubaIdentityServerAdminBuilder AddCustomConfiguration <TAdminIdentityDbContext, TIdentityServerConfigurationDbContext, TIdentityServerPersistedGrantDbContext, TAdminLogDbContext> (this IServiceCollection services, IHostingEnvironment hostingEnvironment, Action <DbContextOptionsBuilder> identityDbContextOptions, Action <ConfigurationStoreOptions> configurationStoreOptions, Action <OperationalStoreOptions> operationalStoreOptions, Action <DbContextOptionsBuilder> logDbContextOptions) where TAdminIdentityDbContext : DbContext where TIdentityServerConfigurationDbContext : DbContext, IAdminConfigurationDbContext where TIdentityServerPersistedGrantDbContext : DbContext, IAdminPersistedGrantDbContext where TAdminLogDbContext : DbContext, IAdminLogDbContext { var builder = new SkorubaIdentityServerAdminBuilder(services); builder.Services.AddDbContexts <TAdminIdentityDbContext, TIdentityServerConfigurationDbContext, TIdentityServerPersistedGrantDbContext, TAdminLogDbContext> (hostingEnvironment, identityDbContextOptions, configurationStoreOptions, operationalStoreOptions, logDbContextOptions); return(builder); }