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

  • Home
  • SEARCH
  • 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 610965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:43:57+00:00 2026-05-13T17:43:57+00:00

I have a database which consists of the following: ** Table 1 ** Id

  • 0

I have a database which consists of the following:

** Table 1 **

  • Id (PK)
  • Field1

** Table 2 **

  • Id (PK)
  • Field2

** Link Table **

  • Table1Id (FK)
  • Table2Id (FK)

The problem is, I cannot access Table 2 from Table 1, even though the relationship exists in the database.

For example, the following should be possible:

var Results = from c in DataContext.Table1
              where c.Table2.Field2 == "Test"
              select c;

However, “c.Table2.Field2” is not available for some reason – all I get for “c.Table2.” is the following (among the standard any<>, where<> et al):

  • RelationshipName
  • RelationshipSet
  • SourceRoleName
  • TargetRoleName

So obviously something is screwy somewhere, but I cannot work out what!

Both tables exist in the Entity Schema, and have a valid relationship between them.

  • 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-05-13T17:43:57+00:00Added an answer on May 13, 2026 at 5:43 pm

    The reason that c.Table2.Field2 is not available is that c.Table2 doesn’t have a property called Field2. c.Table2 is a list of entities which have that property, not an instance of that entity. It’s not clear what your intention is here, but I think you want:

    var Results = from c in DataContext.Table1
                  where c.Table2.Any(t2 => t2.Field2 == "Test")
                  select c;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following tables in my database: Employee Table which consists of Name,
Lets say I have a database table which consists of three columns: id ,
I have an (access) database table which contains data I would like to populate
I have a huge database (800MB) which consists of a field called 'Date Last
I have a database which has a table that stores medical conditions and another
I have a database which stores (among other things), the following pieces of information:
Consider a database(MSSQL 2005) that consists of 100+ tables which have primary keys defined
I have an application which consists of two activities/screens and a java class from
I have a database generated page which shows lots of links. This page consists
i have a php code which selects and shows data from my 'elections' table.

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.