Hi,
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.