public virtual ArtistForSong AddSong(Song song, bool support, ArtistRoles roles) { ParamIs.NotNull(() => song); var link = new ArtistForSong(song, this, support, roles); AllSongs.Add(link); song.AllArtists.Add(link); return(link); }
public ArchivedArtistForSongContract(ArtistForSong entry) { IsSupport = entry.IsSupport; Roles = entry.Roles; if (entry.Artist != null) { Id = entry.Artist.Id; NameHint = entry.Artist.DefaultName; } else { NameHint = entry.Name; } }
public ArtistForSongContract(ArtistForSong artistForSong, ContentLanguagePreference languagePreference) { ParamIs.NotNull(() => artistForSong); Artist = (artistForSong.Artist != null ? new ArtistContract(artistForSong.Artist, languagePreference) : null); Categories = artistForSong.ArtistCategories; EffectiveRoles = artistForSong.EffectiveRoles; Id = artistForSong.Id; IsSupport = artistForSong.IsSupport; Name = (Artist != null ? Artist.Name : artistForSong.Name); Roles = artistForSong.Roles; }
public ArtistForSongContract(ArtistForSong artistForSong, ContentLanguagePreference languagePreference) { ParamIs.NotNull(() => artistForSong); Artist = (artistForSong.Artist != null ? new ArtistWithAdditionalNamesContract(artistForSong.Artist, languagePreference) : null); Categories = artistForSong.ArtistCategories; EffectiveRoles = artistForSong.EffectiveRoles; Id = artistForSong.Id; IsSupport = artistForSong.IsSupport; Name = (Artist != null ? Artist.Name : artistForSong.Name); Roles = artistForSong.Roles; }