Beispiel #1
0
        public void Delete(int id, string notes)
        {
            UpdateEntity <Song>(id, (session, song) => {
                EntryPermissionManager.VerifyDelete(PermissionContext, song);

                AuditLog(string.Format("deleting song {0}", EntryLinkFactory.CreateEntryLink(song)), session);

                song.Delete();

                Archive(session, song, new SongDiff(false), SongArchiveReason.Deleted, notes);
            }, PermissionToken.Nothing, skipLog: true);
        }
Beispiel #2
0
        public void Delete(int id, string notes)
        {
            UpdateEntity <Artist>(id, (session, a) => {
                EntryPermissionManager.VerifyDelete(PermissionContext, a);

                AuditLog(string.Format("deleting artist {0}{1}", EntryLinkFactory.CreateEntryLink(a), !string.IsNullOrEmpty(notes) ? " " + notes : string.Empty), session);

                NHibernateUtil.Initialize(a.Picture);
                a.Delete();

                Archive(session, a, new ArtistDiff(false), ArtistArchiveReason.Deleted, notes);
            }, PermissionToken.Nothing, skipLog: true);
        }
Beispiel #3
0
        public void Delete(int id, string notes)
        {
            UpdateEntity <Album>(id, (session, a) => {
                EntryPermissionManager.VerifyDelete(PermissionContext, a);

                AuditLog(string.Format("deleting album {0}", EntryLinkFactory.CreateEntryLink(a)), session);

                NHibernateUtil.Initialize(a.CoverPictureData);
                a.Delete();

                Archive(session, a, new AlbumDiff(false), AlbumArchiveReason.Deleted, notes);
            }, PermissionToken.Nothing, skipLog: true);
        }