Link to home
Create AccountLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Need a LINQ query inside a LINQ query

I have a list of MasterSet objects:

Each MasterSet contains a list of ReferenceSet objects.

Each ReferenceSet has a TypeID of type long

A MasterSet's list of ReferenceSet objects always contains one and only one ReferenceSet object with a TypeID of 82, as well as other ReferenceSet objects with TypeID's != 82.

How do I query the list of MasterSet objects to return the list of ReferenceSet objects with TypeID's == 82 ??

Avatar of kaufmed
Flag of United States of America image

Is this a LINQ-to-SQL or Entity Framework query, or is this LINQ-to-Objects (e.g. List<MasterSet>)?
Avatar of curiouswebster


L2E  and I prefer the fluent LINQ queries, an can not even really read the other style which looks more like a SQL command.
Avatar of Mihai Stancescu
Mihai Stancescu
Flag of Romania image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
This looks great.  I will accept your answer and post a new one if I have any problems using it.