From 8a6e05379bc6656d27734770dd6ea47224432daa Mon Sep 17 00:00:00 2001 From: KatterMaw Date: Thu, 9 Nov 2023 23:55:03 +0500 Subject: [PATCH] use ChangingAndChangedNotificationsWithOriginalValues for fix exception while saving profile edits https://github.com/dotnet/efcore/issues/32168?ysclid=lorhvmadt6460115286 --- SightKeeper.Data/AppDbContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SightKeeper.Data/AppDbContext.cs b/SightKeeper.Data/AppDbContext.cs index ed609b16..7333d524 100644 --- a/SightKeeper.Data/AppDbContext.cs +++ b/SightKeeper.Data/AppDbContext.cs @@ -63,7 +63,7 @@ private static void SetupSqlite(DbContextOptionsBuilder optionsBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder) { - modelBuilder.HasChangeTrackingStrategy(ChangeTrackingStrategy.ChangingAndChangedNotifications); + modelBuilder.HasChangeTrackingStrategy(ChangeTrackingStrategy.ChangingAndChangedNotificationsWithOriginalValues); modelBuilder.ApplyConfiguration(new ScreenshotsLibraryConfiguration()); modelBuilder.ApplyConfiguration(new ScreenshotConfiguration());