public void AddItem(Musics musics) { PlayLine line = Lines .Where(p => p.Musics.Id == musics.Id) .FirstOrDefault(); if (line == null) { Lines.Add(new PlayLine { Musics = musics } ); } }
public void RemoveLine(Musics musics) => Lines.RemoveAll(l => l.Musics.Id == musics.Id);