Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8091949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:10:56+00:00 2026-06-05T20:10:56+00:00

I have a SQL question that i need to ask the experts. To be

  • 0

I have a SQL question that i need to ask the experts. To be honest i dont even know how to ask it so i will do so by example.

I have my top level table called Clients
My Clients have Locations so i have a table called Locations
Each location has Contacts so i have a table called Contacts

Relationship in SQL looks like

Clients —> Locations —> Contacts.

Notice there is no direct relationship defined between Clients and Contacts.

I need to return all clients for a give Client.

How can i do this using Entity Frame work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:10:58+00:00Added an answer on June 5, 2026 at 8:10 pm

    Assuming you want a LINQ to Entities query:

    context.Clients.SelectMany(
        client => client.Locations.Select(
            location => location.Contacts)).Distinct().ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a noobie question: I need to write SQL script that returns 3
I have a seemly simple question with SQL that I am having trouble figuring
I have a short question. Im my current project I'm using LINQ-to-SQl. That is
I have a SQL question that I could use some help with. Still somewhat
I have a sql question that is closely related to this question - SQL
Hi all SQL Server Blackbelt masters out there. I have a simple question that
I have an SQL question which may be basic to some but is confusing
I have a small sql question for you. I have two queries: SELECT tbl_CostPrevisions.Month,
I have this question in which I have a SQL Server Compact Edition database
T-SQL DateTime Question. I have a set of time ranges. During those time ranges

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.