diff --git a/LANCommander/Data/Models/Action.cs b/LANCommander/Data/Models/Action.cs index d99a993..a92e649 100644 --- a/LANCommander/Data/Models/Action.cs +++ b/LANCommander/Data/Models/Action.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace LANCommander.Data.Models { @@ -11,6 +12,7 @@ namespace LANCommander.Data.Models public string WorkingDirectory { get; set; } public bool PrimaryAction { get; set; } + [JsonIgnore] public virtual Game Game { get; set; } } } diff --git a/LANCommander/Data/Models/Company.cs b/LANCommander/Data/Models/Company.cs index f128022..25de466 100644 --- a/LANCommander/Data/Models/Company.cs +++ b/LANCommander/Data/Models/Company.cs @@ -1,10 +1,14 @@ -namespace LANCommander.Data.Models +using System.Text.Json.Serialization; + +namespace LANCommander.Data.Models { public class Company : BaseModel { public string Name { get; set; } + [JsonIgnore] public virtual ICollection PublishedGames { get; set; } + [JsonIgnore] public virtual ICollection DevelopedGames { get; set; } } } diff --git a/LANCommander/Data/Models/Genre.cs b/LANCommander/Data/Models/Genre.cs index 13c5f02..4da9d2c 100644 --- a/LANCommander/Data/Models/Genre.cs +++ b/LANCommander/Data/Models/Genre.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace LANCommander.Data.Models { @@ -6,6 +7,7 @@ namespace LANCommander.Data.Models public class Genre : BaseModel { public string Name { get; set; } + [JsonIgnore] public virtual ICollection Games { get; set; } } } diff --git a/LANCommander/Data/Models/Key.cs b/LANCommander/Data/Models/Key.cs index f898e0c..cd7beb5 100644 --- a/LANCommander/Data/Models/Key.cs +++ b/LANCommander/Data/Models/Key.cs @@ -1,5 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace LANCommander.Data.Models { @@ -8,6 +9,7 @@ namespace LANCommander.Data.Models { [MaxLength(255)] public string Value { get; set; } + [JsonIgnore] public virtual Game Game { get; set; } public KeyAllocationMethod AllocationMethod { get; set; } [MaxLength(17)] diff --git a/LANCommander/Data/Models/MultiplayerMode.cs b/LANCommander/Data/Models/MultiplayerMode.cs index a51ae8e..8c83f95 100644 --- a/LANCommander/Data/Models/MultiplayerMode.cs +++ b/LANCommander/Data/Models/MultiplayerMode.cs @@ -1,5 +1,6 @@ using LANCommander.Data.Enums; using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace LANCommander.Data.Models { @@ -13,6 +14,7 @@ namespace LANCommander.Data.Models public int MaxPlayers { get; set; } public int Spectators { get; set; } + [JsonIgnore] public virtual Game Game { get; set; } } } diff --git a/LANCommander/Data/Models/Tag.cs b/LANCommander/Data/Models/Tag.cs index 6c71dda..c8e0875 100644 --- a/LANCommander/Data/Models/Tag.cs +++ b/LANCommander/Data/Models/Tag.cs @@ -1,5 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace LANCommander.Data.Models { @@ -8,6 +9,7 @@ namespace LANCommander.Data.Models { public string Name { get; set; } + [JsonIgnore] public virtual List Games { get; set; } } }