public bool DeleteUserPlaylist(UserPlaylist userPlaylist) { try { UserPlaylistTable.DeleteOnSubmit(userPlaylist); UserPlaylistTable.Context.SubmitChanges(); return true; } catch { return false; } }
public bool SaveUserPlaylist(UserPlaylist userPlaylist) { try { if (userPlaylist.UserPlaylistId == 0) { UserPlaylistTable.InsertOnSubmit(userPlaylist); } else { UserPlaylistTable.Context.Refresh(RefreshMode.KeepCurrentValues, userPlaylist); } UserPlaylistTable.Context.SubmitChanges(); return true; } catch { return false; } }