Linq to Sql Filtering child table

B

Benny

I am trying to select certain data from a parent table, but would like
to constrain the results based on the child tables attributes. The
relationship is a one to many so if i try to specify a filter for the
child table, i unable to access the child attributes. Does anyone
have any ideas on how i might be able to do this?

An example of the relationship is below:

Country
-----------
CountryId
Name

State
-------
StateId
CountryId
Name
Population

I want to select only States with city populations greater than
50,000.

Thanks in advance!
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top