From bca383c4d0e2683ba0f18f00effa4649a545dca6 Mon Sep 17 00:00:00 2001 From: Spirtix Date: Mon, 30 Jun 2025 15:26:47 +0200 Subject: [PATCH] remove PairData.Update this is expensive and unnecessary because the entity is already tracked --- src/Services/KeyValueService.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Services/KeyValueService.cs b/src/Services/KeyValueService.cs index 1144108..9eb85c7 100644 --- a/src/Services/KeyValueService.cs +++ b/src/Services/KeyValueService.cs @@ -50,9 +50,7 @@ public class KeyValueService { } } - if (exists) - ctx.PairData.Update(pair); - else + if (!exists) ctx.PairData.Add(pair); ctx.SaveChanges();