public void Copy(Song_Bindable bindable) { bindable.Id = id; bindable.Title = title; var firstTrack = tracks != null?tracks.Where(t => t.preview_url != null) : null; bindable.Url = firstTrack != null && firstTrack.Count() > 0 ? firstTrack.First().preview_url : null; }
public void Copy(IEnumerable <Song> response) { try { this._allSongs.Clear(); if (response.Count() > 0) { foreach (var item in response) { var newitem = new Song_Bindable(); item.Copy(newitem); this._allSongs.Add(newitem); } } } catch (Exception e) { throw (e); } }