Handling related data in the collection delete

This commit is contained in:
Zoe Roux
2020-06-19 19:20:19 +02:00
parent 15d8173433
commit 2aa87378fc
2 changed files with 16 additions and 1 deletions
+8
View File
@@ -19,6 +19,14 @@ namespace Kyoo.Models
get => Links.Select(x => x.Show);
set => Links = value.Select(x => new CollectionLink(this, x));
}
[NotMergable] [JsonIgnore] public virtual IEnumerable<LibraryLink> LibraryLinks { get; set; }
[NotMergable] [JsonIgnore] public IEnumerable<Library> Libraries
{
get => LibraryLinks?.Select(x => x.Library);
set => LibraryLinks = value?.Select(x => new LibraryLink(x, this));
}
public Collection() { }