From c6ee1a6afebd99c483d196764b010d189b4249fc Mon Sep 17 00:00:00 2001 From: asesidaa <1061472754@qq.com> Date: Sat, 21 Oct 2023 14:36:23 +0800 Subject: [PATCH] Suppress Sentinel warnings --- GameDatabase/Context/TaikoDbContextPartial.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameDatabase/Context/TaikoDbContextPartial.cs b/GameDatabase/Context/TaikoDbContextPartial.cs index d2f1fc4..6f69be2 100644 --- a/GameDatabase/Context/TaikoDbContextPartial.cs +++ b/GameDatabase/Context/TaikoDbContextPartial.cs @@ -24,7 +24,7 @@ public partial class TaikoDbContext .OnDelete(DeleteBehavior.Cascade); entity.Property(e => e.ClearState).HasConversion().HasDefaultValue(DanClearState.NotClear); - entity.Property(e => e.DanType).HasConversion().HasDefaultValue(DanType.Normal); + entity.Property(e => e.DanType).HasConversion().HasDefaultValue(DanType.Normal).HasSentinel(0); }); modelBuilder.Entity(entity => @@ -35,7 +35,7 @@ public partial class TaikoDbContext .WithMany(p => p.DanStageScoreData) .HasForeignKey(d => new { d.Baid, d.DanId, d.DanType }) .OnDelete(DeleteBehavior.Cascade); - entity.Property(e => e.DanType).HasConversion().HasDefaultValue(DanType.Normal); + entity.Property(e => e.DanType).HasConversion().HasDefaultValue(DanType.Normal).HasSentinel(0); }); modelBuilder.Entity(entity =>