public void AddPlaylist(Playlist playlist) { using (var tran = _session.BeginTransaction()) { try { _session.Save(playlist); tran.Commit(); Logger.LogMediafileAdded(playlist.PlaylistName); } catch (Exception ex) { Logger.AddToLog("Failed to add media file.", ex); tran.Rollback(); } } }
public static Playlist CreatePlaylist(string name, string comment) { var playlist = new Playlist(name, comment); return playlist; }