Fixed data model classes to generate unique ids when created

This commit is contained in:
Thorsten Sommer 2023-01-22 21:39:36 +01:00
parent a868087af9
commit 35009dba7c
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
4 changed files with 4 additions and 4 deletions

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;

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;

View File

@ -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;

View File

@ -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();