Fixed data model classes to generate unique ids when created

This commit is contained in:
tsommer committed 2023-01-22 21:39:36 +01:00
1 parent a868087af9
commit 35009dba7c
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ public sealed class Section
[Key] [Key]
public int Id { get; set; } public int Id { get; set; }
public Guid UniqueId { get; set; } public Guid UniqueId { get; set; } = Guid.NewGuid();
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
+1 -1
View File
@@ -8,7 +8,7 @@ public sealed class Setting
[Key] [Key]
public int Id { get; set; } public int Id { get; set; }
public Guid UniqueId { get; set; } public Guid UniqueId { get; set; } = Guid.NewGuid();
public string Code { get; set; } = string.Empty; public string Code { get; set; } = string.Empty;
@@ -8,7 +8,7 @@ public sealed class TextElement
[Key] [Key]
public int Id { get; set; } public int Id { get; set; }
public Guid UniqueId { get; set; } public Guid UniqueId { get; set; } = Guid.NewGuid();
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
@@ -6,7 +6,7 @@ public sealed class Translation
{ {
public int Id { get; set; } public int Id { get; set; }
public Guid UniqueId { get; set; } public Guid UniqueId { get; set; } = Guid.NewGuid();
public TextElement TextElement { get; set; } = new(); public TextElement TextElement { get; set; } = new();