public void Execute(object parameter) { var itemToRemove = (ListItemViewModel)parameter; if (_listRepository.DeleteItem(itemToRemove.Id)) { this._viewModel.PlaylistCollection.Remove(itemToRemove); } }
public bool RemovePlaylistItem(IVideoContent item) { var result = _playlistRepository.DeleteItem(Id, item.Id); if (result) { ItemRemoved?.Invoke(this, new LocalPlaylistItemRemovedEventArgs() { PlaylistId = Id, RemovedItems = new[] { item.Id } }); } return(result); }