How would I go about writing a LINQ statement that selects the parent objects that have a matching child object in it's collection? Here's example classes.
class Parent {
int ID { get; set; }
string Name { get; set; }
List<Child> Children { get; set; }
}
class Child {
int ID { get; set; }
string Name { get; set; }
string Nickname { get; set; }
}
In the example above, I would like to return all of the parents that contain a child with a specific nickname.