예제 #1
0
파일: Album.cs 프로젝트: ffdd270/vocadb
        /// <summary>
        /// Cleans up all links to other entries so that this entry can be deleted.
        /// </summary>
        public virtual void DeleteLinks()
        {
            var artistLinks = AllArtists.ToArray();

            foreach (var artist in artistLinks)
            {
                artist.Delete();
            }

            var songLinks = AllSongs.ToArray();

            foreach (var song in songLinks)
            {
                song.Delete();
            }

            var users = UserCollections.ToArray();

            foreach (var user in users)
            {
                user.Delete();
            }

            Tags.DeleteUsages();

            // Archived versions and comments are cascaded
        }
예제 #2
0
        /// <summary>
        /// Cleans up all links to other entries so that this entry can be deleted.
        /// </summary>
        public virtual void DeleteLinks()
        {
            var artistLinks = AllArtists.ToArray();

            foreach (var artist in artistLinks)
            {
                artist.Delete();
            }

            var songLinks = AllSongs.ToArray();

            foreach (var song in songLinks)
            {
                song.Delete();
            }

            var users = UserCollections.ToArray();

            foreach (var user in users)
            {
                user.Delete();
            }

            //ArchivedVersionsManager.Clear();
            //Comments.Clear();
        }