public bool DeletePlaylistSong(PlaylistSong playlistSong) { try { PlaylistSongTable.DeleteOnSubmit(playlistSong); PlaylistSongTable.Context.SubmitChanges(); return true; } catch (Exception) { return false; } }
public bool SavePlaylistSong(PlaylistSong playlistSong) { try { if (playlistSong.PlaylistSongId == 0) { PlaylistSongTable.InsertOnSubmit(playlistSong); } else { PlaylistSongTable.Context.Refresh(RefreshMode.KeepCurrentValues, playlistSong); } PlaylistSongTable.Context.SubmitChanges(); return true; } catch (Exception) { return false; } }