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; } }
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; } }