I have two classes:
public class Artikel
{
int id{get;set;};
string name{get;set;};
}
public class NewArtikel
{
int id{get;set;};
List<Artikel> artikels{get;set;};
}
Now, I have a list of the second class
List<NewArtikel> myList = new List<NewArtikel>()
Is there are any posibility in LINQ to SQL to select all elements from myList with the needed Artikel.name
Yes
The
SelectManyflattens allArtikels from all theNewArtikelelements, then theWherefilters them byname.Okay so, if you want the
NewArtikels that have anArtikelwith the required name you could do.