コード例 #1
0
ファイル: Performer.cs プロジェクト: radtek/MaxCriticWeb
        public static Performer[] GetPerformerByEntertainmentAndRole(Entertainment entertainment, PerformerInEntertainment.Role role)
        {
            PerformerInEntertainment[] performerInEntertainments = PerformerInEntertainment.GetPerformerInEntertainmentByEntertainmentAndRole(entertainment, role);
            if (performerInEntertainments == null)
            {
                return(null);
            }
            List <Guid> ids = new List <Guid>();

            foreach (var performerInEntertainment in performerInEntertainments)
            {
                ids.Add(performerInEntertainment.PerformerId);
            }
            return(Performer.GetByIds(ids.ToArray()));
        }
コード例 #2
0
ファイル: Performer.cs プロジェクト: radtek/MaxCriticWeb
        public static Performer[] GetAlbumAuthorsByAlbum(Entertainment entertainment)
        {
            lock (_locker)
            {
                if (entertainment.EntertainmentType != Entertainment.Type.Album)
                {
                    return(null);
                }

                PerformerInEntertainment[] performerInEntertainments = PerformerInEntertainment.GetAlbumAuthorsPerformerInEntertainmentsByEntertainment(entertainment);
                if (performerInEntertainments == null)
                {
                    return(null);
                }
                List <Guid> ids = new List <Guid>();
                foreach (var performerInEntertainment in performerInEntertainments)
                {
                    ids.Add(performerInEntertainment.PerformerId);
                }

                return(Performer.GetByIds(ids.ToArray()));
            }
        }