From 0fbf5965d3bf1d5ae3b81e738ee992ccf02f4834 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Tue, 17 Oct 2023 10:26:50 +0100 Subject: [PATCH] refactor: no need to set definition as internal --- .../src/Quotas.Domain/Aggregates/Identities/TierQuota.cs | 4 +--- .../EntityConfigurations/TierQuotaEntityTypeConfiguration.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/Quotas/src/Quotas.Domain/Aggregates/Identities/TierQuota.cs b/Modules/Quotas/src/Quotas.Domain/Aggregates/Identities/TierQuota.cs index 2dc69a0517..10bc58467d 100644 --- a/Modules/Quotas/src/Quotas.Domain/Aggregates/Identities/TierQuota.cs +++ b/Modules/Quotas/src/Quotas.Domain/Aggregates/Identities/TierQuota.cs @@ -5,9 +5,7 @@ namespace Backbone.Modules.Quotas.Domain.Aggregates.Identities; public class TierQuota : Quota { -#pragma warning disable IDE1006 // Naming Styles - internal readonly TierQuotaDefinition _definition; -#pragma warning restore IDE1006 // Naming Styles + private readonly TierQuotaDefinition _definition; private TierQuota() { } diff --git a/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/TierQuotaEntityTypeConfiguration.cs b/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/TierQuotaEntityTypeConfiguration.cs index cb0c38058e..2244606d38 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/TierQuotaEntityTypeConfiguration.cs +++ b/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/TierQuotaEntityTypeConfiguration.cs @@ -11,7 +11,7 @@ public void Configure(EntityTypeBuilder builder) builder.HasKey(x => x.Id); builder.ToTable($"{nameof(TierQuota)}s"); builder.Ignore(x => x.Weight); - builder.HasOne(x => x._definition).WithMany().OnDelete(DeleteBehavior.Cascade); + builder.HasOne("_definition").WithMany().OnDelete(DeleteBehavior.Cascade); builder.Property("_definitionId").HasColumnName("DefinitionId"); builder.Ignore(x => x.DefinitionId); }