diff --git a/src/OpenIddict.Abstractions/OpenIddictBuilder.cs b/src/OpenIddict.Abstractions/OpenIddictBuilder.cs index 4627bb4e..7fea9e49 100644 --- a/src/OpenIddict.Abstractions/OpenIddictBuilder.cs +++ b/src/OpenIddict.Abstractions/OpenIddictBuilder.cs @@ -35,13 +35,6 @@ namespace Microsoft.Extensions.DependencyInjection [EditorBrowsable(EditorBrowsableState.Never)] public IServiceCollection Services { get; } - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -56,5 +49,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs index 28a40df5..c4317891 100644 --- a/src/OpenIddict.Core/OpenIddictCoreBuilder.cs +++ b/src/OpenIddict.Core/OpenIddictCoreBuilder.cs @@ -806,13 +806,6 @@ namespace Microsoft.Extensions.DependencyInjection return Configure(options => options.EntityCacheLimit = limit); } - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -827,5 +820,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs index 1d6749af..abec7341 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictApplicationConfiguration.cs @@ -65,11 +65,17 @@ namespace OpenIddict.EntityFramework HasMany(application => application.Authorizations) .WithOptional(authorization => authorization.Application) - .Map(association => association.MapKey("ApplicationId")); + .Map(association => + { + association.MapKey(nameof(OpenIddictAuthorization.Application) + nameof(OpenIddictApplication.Id)); + }); HasMany(application => application.Tokens) .WithOptional(token => token.Application) - .Map(association => association.MapKey("ApplicationId")); + .Map(association => + { + association.MapKey(nameof(OpenIddictToken.Application) + nameof(OpenIddictApplication.Id)); + }); ToTable("OpenIddictApplications"); } diff --git a/src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs b/src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs index 4cdc0625..06698f2d 100644 --- a/src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs +++ b/src/OpenIddict.EntityFramework/Configurations/OpenIddictAuthorizationConfiguration.cs @@ -63,7 +63,7 @@ namespace OpenIddict.EntityFramework HasMany(authorization => authorization.Tokens) .WithOptional(token => token.Authorization) - .Map(association => association.MapKey("AuthorizationId")) + .Map(association => association.MapKey(nameof(OpenIddictToken.Authorization) + nameof(OpenIddictAuthorization.Id))) .WillCascadeOnDelete(); ToTable("OpenIddictAuthorizations"); diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs index 4dc84220..2b8df5da 100644 --- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs +++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkBuilder.cs @@ -112,13 +112,6 @@ namespace Microsoft.Extensions.DependencyInjection return Configure(options => options.DbContextType = type); } - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -133,5 +126,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs index e4ca3a51..fb9a2f9c 100644 --- a/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs +++ b/src/OpenIddict.EntityFrameworkCore/Configurations/OpenIddictAuthorizationConfiguration.cs @@ -64,7 +64,7 @@ namespace OpenIddict.EntityFrameworkCore builder.HasMany(authorization => authorization.Tokens) .WithOne(token => token.Authorization) - .HasForeignKey("AuthorizationId") + .HasForeignKey(nameof(OpenIddictToken.Authorization) + nameof(OpenIddictAuthorization.Id)) .IsRequired(required: false); builder.ToTable("OpenIddictAuthorizations"); diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs index b19d1fc0..549ff96c 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreBuilder.cs @@ -122,13 +122,6 @@ namespace Microsoft.Extensions.DependencyInjection return Configure(options => options.DbContextType = type); } - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -143,5 +136,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs index 06b8a52e..bb932d85 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbBuilder.cs @@ -198,13 +198,6 @@ namespace Microsoft.Extensions.DependencyInjection return Configure(options => options.Database = database); } - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -219,5 +212,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs b/src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs index 58a0a7c7..c94a6b06 100644 --- a/src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs +++ b/src/OpenIddict.Mvc/OpenIddictMvcBuilder.cs @@ -64,13 +64,6 @@ namespace Microsoft.Extensions.DependencyInjection public OpenIddictMvcBuilder DisableBindingExceptions() => Configure(options => options.DisableBindingExceptions = true); - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -85,5 +78,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.Server/OpenIddictServerBuilder.cs b/src/OpenIddict.Server/OpenIddictServerBuilder.cs index f6c1176d..adfeb173 100644 --- a/src/OpenIddict.Server/OpenIddictServerBuilder.cs +++ b/src/OpenIddict.Server/OpenIddictServerBuilder.cs @@ -761,13 +761,6 @@ namespace Microsoft.Extensions.DependencyInjection public OpenIddictServerBuilder UseRollingTokens() => Configure(options => options.UseRollingTokens = true); - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -782,5 +775,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs index 991262f0..8780ed45 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs @@ -204,13 +204,6 @@ namespace Microsoft.Extensions.DependencyInjection public OpenIddictValidationBuilder UseReferenceTokens() => Configure(options => options.UseReferenceTokens = true); - /// - /// Returns a string that represents the current object. - /// - /// A string that represents the current object. - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - /// /// Determines whether the specified object is equal to the current object. /// @@ -225,5 +218,12 @@ namespace Microsoft.Extensions.DependencyInjection /// A hash code for the current object. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => base.GetHashCode(); + + /// + /// Returns a string that represents the current object. + /// + /// A string that represents the current object. + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } }