public async Task RemoveFromFavorities(YoutubeItem entity) { var list = await localFavorsRepository.ReadAll(); var entitytoremove = list.Where(x => x.VideoId == entity.VideoId).FirstOrDefault(); var v = await localFavorsRepository.Delete(entitytoremove); // var entitytoremove = FavoriteList.Where(x => x.VideoId == entity.VideoId).FirstOrDefault(); // var result = await localFavorsRepository.Delete(entitytoremove); }
public async Task Remove(YoutubeItem entity) { var list = await localFavorsRepository.ReadAll(); var entitytoremove = list.Where(x => x.VideoId == entity.VideoId).FirstOrDefault(); await localFavorsRepository.Delete(entitytoremove); var l = FavoritesVideos.Where(x => x.VideoId != entity.VideoId); FavoritesVideos = new ObservableCollection <YoutubeItem>(l); this.RaisePropertyChanged(() => this.FavoritesVideos); }