Пример #1
0
 public void Delete(Guid id)
 {
     try
     {
         Playlist playlist = PlaylistDao.Get(id);
         playlist.User.RemovePlaylist(playlist);
         PlaylistDao.Delete(playlist);
     }
     catch (Exception exception)
     {
         Logger.Error(exception);
         throw;
     }
 }
Пример #2
0
        public void Delete(Guid id)
        {
            try
            {
                NHibernateSessionManager.Instance.BeginTransaction();

                Playlist playlist = PlaylistDao.Get(id);
                playlist.Folder.RemovePlaylist(playlist);
                PlaylistDao.Delete(playlist);

                NHibernateSessionManager.Instance.CommitTransaction();
            }
            catch (Exception exception)
            {
                Logger.Error(exception);
                NHibernateSessionManager.Instance.RollbackTransaction();
                throw;
            }
        }