using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; namespace Ombi.Store.Entities { [Table("PlexEpisode")] public class PlexEpisode : MediaServerEpisode { public string Key { get; set; } // RatingKey /// /// The parent key. /// public string ParentKey { get; set; } /// /// The grandparent key. /// public string GrandparentKey { get; set; } [NotMapped] public PlexServerContent PlexSeries { get => (PlexServerContent)Series; set => Series = value; } public override IMediaServerContent SeriesIsIn(ICollection content) { return content.OfType().FirstOrDefault( x => x.Key == this.PlexSeries.Key); } } }