From bafb325880b1bfa63870ed0973874a8891532d55 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 22 Jan 2023 21:58:01 +0100 Subject: [PATCH] Improved Git merge performance of exported files The exported entries appear now in a deterministic order, which made merges a lot easier. --- I18N Commander/DataModel/Database/Common/DataContext.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/I18N Commander/DataModel/Database/Common/DataContext.cs b/I18N Commander/DataModel/Database/Common/DataContext.cs index 58872c3..4e9c8be 100644 --- a/I18N Commander/DataModel/Database/Common/DataContext.cs +++ b/I18N Commander/DataModel/Database/Common/DataContext.cs @@ -160,10 +160,10 @@ public sealed class DataContext : DbContext, IDataContext await JsonSerializer.SerializeAsync(fileStream, new JsonData { - Settings = this.Settings.Select(n => n.ToJsonSetting()).ToList(), - Sections = this.Sections.Select(n => n.ToJsonSection()).ToList(), - TextElements = this.TextElements.Select(n => n.ToJsonTextElement()).ToList(), - Translations = this.Translations.Select(n => n.ToJsonTranslation()).ToList(), + Settings = this.Settings.OrderBy(n => n.UniqueId).Select(n => n.ToJsonSetting()).ToList(), + Sections = this.Sections.OrderBy(n => n.UniqueId).Select(n => n.ToJsonSection()).ToList(), + TextElements = this.TextElements.OrderBy(n => n.UniqueId).Select(n => n.ToJsonTextElement()).ToList(), + Translations = this.Translations.OrderBy(n => n.UniqueId).Select(n => n.ToJsonTranslation()).ToList(), }, jsonSettings); }