linq get list of objects based on the value in grandchild

The solution for “linq get list of objects based on the value in grandchild” can be found here. The following code will assist you in solving the problem.

Pets.Where( p => p.Toy.Owners.Any(o => o.Name == “OwnerNameYourLookingFor”) );

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in