Beispiel #1
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();
            }

            Tags.DeleteUsages();

            // Archived versions and comments are cascaded
        }
Beispiel #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();
        }