From 02610811f61a73b655833289b75fd951e26e93fd Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Wed, 18 Feb 2026 23:30:15 +0700 Subject: [PATCH] Refactor to add accounts individually to context Replaced context.AddRange(accounts) with context.Add(account) in a loop to add each account individually before saving changes. This may improve control over entity tracking or validation. Other logic remains unchanged. --- MainCore/Commands/UI/AddAccountsViewModel/AddAccountsCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainCore/Commands/UI/AddAccountsViewModel/AddAccountsCommand.cs b/MainCore/Commands/UI/AddAccountsViewModel/AddAccountsCommand.cs index 663e7776..8b5a53f3 100644 --- a/MainCore/Commands/UI/AddAccountsViewModel/AddAccountsCommand.cs +++ b/MainCore/Commands/UI/AddAccountsViewModel/AddAccountsCommand.cs @@ -46,9 +46,9 @@ IRxQueue rxQueue Value = value, }); } + context.Add(account); } - context.AddRange(accounts); context.SaveChanges(); rxQueue.Enqueue(new AccountsModified());