public override Image GetBannerImage(EntityBase entity) { Episode episode = (Episode)entity; Image image = episode.Images.FirstOrDefault((a) => a.MappedType == ImageType.SeasonWide || a.MappedType == ImageType.Graphical); if (image == null) { image = new SeasonService().GetBannerImage(episode.Parent); } return(image); }
public static IEntityService GetService(EntityBase entity) { ValidationUtility.ThrowIfNullOrEmpty(entity, "entity"); IEntityService service = null; if (entity is Show) { service = new ShowService(); } else if (entity is Episode) { service = new EpisodeService(); } else if (entity is Season) { service = new SeasonService(); } else if (entity is Movie) { service = new MovieService(); } return(service); }