diff --git a/.config b/.config index b2238a0..009199d 160000 --- a/.config +++ b/.config @@ -1 +1 @@ -Subproject commit b2238a087dcca0bf14bd1a9563d314ae14fabf94 +Subproject commit 009199ddef35edff6be934b218065bb8db645a13 diff --git a/src/Configuration.Peristence.IdentityServer/ApiAuthorizationDbContext.cs b/src/Configuration.Peristence.IdentityServer/ApiAuthorizationDbContext.cs index 11e0310..5898ac3 100644 --- a/src/Configuration.Peristence.IdentityServer/ApiAuthorizationDbContext.cs +++ b/src/Configuration.Peristence.IdentityServer/ApiAuthorizationDbContext.cs @@ -117,17 +117,17 @@ protected ApiAuthorizationDbContext( #region Overrides of IdentityDbContext,IdentityUserRole,IdentityUserLogin,IdentityRoleClaim,IdentityUserToken> /// - protected override void OnModelCreating(ModelBuilder modelBuilder) + protected override void OnModelCreating(ModelBuilder builder) { - base.OnModelCreating(modelBuilder); + base.OnModelCreating(builder); var configurationStoreOptions = this.GetService>()?.Value ?? throw new InvalidOperationException(nameof(ConfigurationStoreOptions)); var operationalStoreOptions = this.GetService>()?.Value ?? throw new InvalidOperationException(nameof(OperationalStoreOptions)); - modelBuilder.ConfigurePersistedGrantContext(operationalStoreOptions); - modelBuilder.ConfigureResourcesContext(configurationStoreOptions); - modelBuilder.ConfigureClientContext(configurationStoreOptions); + builder.ConfigurePersistedGrantContext(operationalStoreOptions); + builder.ConfigureResourcesContext(configurationStoreOptions); + builder.ConfigureClientContext(configurationStoreOptions); } #endregion Overrides of IdentityDbContext,IdentityUserRole,IdentityUserLogin,IdentityRoleClaim,IdentityUserToken> diff --git a/src/Configuration.Peristence.IdentityServer/ApiAuthorizationPooledDbContext.cs b/src/Configuration.Peristence.IdentityServer/ApiAuthorizationPooledDbContext.cs index c35a660..96f7893 100644 --- a/src/Configuration.Peristence.IdentityServer/ApiAuthorizationPooledDbContext.cs +++ b/src/Configuration.Peristence.IdentityServer/ApiAuthorizationPooledDbContext.cs @@ -124,24 +124,24 @@ protected ApiAuthorizationPooledDbContext( /// exposed in properties on your derived context. The resulting model may be cached /// and re-used for subsequent instances of your derived context. /// - /// /// The builder being used to construct the model for this context. Databases (and other extensions) typically + /// /// The builder being used to construct the model for this context. Databases (and other extensions) typically /// define extension methods on this object that allow you to configure aspects of the model that are specific /// to a given database. /// /// /// If a model is explicitly set on the options for this context (via ) /// then this method will not be run. /// - protected override void OnModelCreating(ModelBuilder modelBuilder) + protected override void OnModelCreating(ModelBuilder builder) { - base.OnModelCreating(modelBuilder); + base.OnModelCreating(builder); var configurationStoreOptions = this.GetService>()?.Value ?? throw new InvalidOperationException(nameof(ConfigurationStoreOptions)); var operationalStoreOptions = this.GetService>()?.Value ?? throw new InvalidOperationException(nameof(OperationalStoreOptions)); - modelBuilder.ConfigurePersistedGrantContext(operationalStoreOptions); - modelBuilder.ConfigureResourcesContext(configurationStoreOptions); - modelBuilder.ConfigureClientContext(configurationStoreOptions); + builder.ConfigurePersistedGrantContext(operationalStoreOptions); + builder.ConfigureResourcesContext(configurationStoreOptions); + builder.ConfigureClientContext(configurationStoreOptions); } #endregion Overrides of IdentityDbContext,IdentityUserRole,IdentityUserLogin,IdentityRoleClaim,IdentityUserToken> diff --git a/src/Configuration.Persistence/Converters/EnumToDescriptionStringConverter.cs b/src/Configuration.Persistence/Converters/EnumToDescriptionStringConverter.cs index 5e84afe..c15d0f4 100644 --- a/src/Configuration.Persistence/Converters/EnumToDescriptionStringConverter.cs +++ b/src/Configuration.Persistence/Converters/EnumToDescriptionStringConverter.cs @@ -12,17 +12,11 @@ namespace Kritikos.Configuration.Persistence.Converters public class EnumToDescriptionStringConverter : ValueConverter where TEnum : struct, Enum { - private static readonly Dictionary EnumString; - - static EnumToDescriptionStringConverter() - { - var values = Enum.GetValues(typeof(TEnum)).Cast(); - - EnumString = values?.ToDictionary( - x => x, - GetDescription) - ?? new Dictionary(); - } + private static readonly Dictionary EnumString = Enum.GetValues(typeof(TEnum)) + .Cast() + .ToDictionary( + x => x, + GetDescription); public EnumToDescriptionStringConverter(ConverterMappingHints? mappingHints = null) : base(