예제 #1
0
        public void DeleteArtist(int artistId)
        {
            if (artistLookupDictionary.ContainsKey(artistId))
            {
                ArtistModel modelToRemove = artistLookupDictionary[artistId];

                AllArtists.Remove(modelToRemove);

                artistLookupDictionary.Remove(artistId);
            }

            DatabaseManager.Current.DeleteArtist(artistId);
        }
예제 #2
0
파일: Album.cs 프로젝트: ffdd270/vocadb
        public virtual void DeleteArtistForAlbum(ArtistForAlbum artistForAlbum)
        {
            if (!artistForAlbum.Album.Equals(this))
            {
                throw new ArgumentException("Artist is not attached to album", "artistForAlbum");
            }

            AllArtists.Remove(artistForAlbum);

            if (artistForAlbum.Artist != null)
            {
                artistForAlbum.Artist.AllAlbums.Remove(artistForAlbum);
            }

            UpdateArtistString();
        }