From 6837bab53b64846f208313f88f3410c81f6ecffb Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Tue, 7 Nov 2023 00:02:52 +0100 Subject: [PATCH] HasSentinel changes: needed because without it Inkball:SignalR tests fail. https://github.com/dotnet/efcore/pull/30760 https://devblogs.microsoft.com/dotnet/announcing-ef8-rc2/ --- src/InkBall.Module/Model/GamesContext.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/InkBall.Module/Model/GamesContext.cs b/src/InkBall.Module/Model/GamesContext.cs index 8544d18b..45d2e329 100644 --- a/src/InkBall.Module/Model/GamesContext.cs +++ b/src/InkBall.Module/Model/GamesContext.cs @@ -166,7 +166,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.bIsPlayer1Active) .HasColumnName("bIsPlayer1Active") - .HasDefaultValue(true); + .HasDefaultValue(true) + .HasSentinel(false); entity.Property(e => e.CreateTime).HasColumnType("datetime"); @@ -360,7 +361,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.Status) .HasDefaultValue(Module.Model.InkBallPoint.StatusEnum.POINT_FREE) - .HasConversion(new EnumToNumberConverter()); + .HasConversion(new EnumToNumberConverter()) + .HasSentinel(Module.Model.InkBallPoint.StatusEnum.POINT_FREE); entity.HasOne(d => d.EnclosingPath) .WithMany(p => p.InkBallPoint)