I have a table called tblSize with these values;
ID (PK) SIZE
1 MM
2 INCH
3 FEET
Then I have another table tblMember with these values;
ID (PK) MEMBER SIZE MIN_SIZE_ID (FK) MAX_SIZE_ID (FK)
1 BOX A 2 3
2 BOX B 3 1
So now these tables are within data entities so I could Pull the Size value if there was only one Foreign Key but I got 2 foreign keys. So single use would be;
@For Each item as tblMember in Model
@Html.DisplayFor(Function(m) item.tblSize.Size) 'THIS SHOULD OUTPUT MM/INCH/FEET
Next
But the problem is there there are 2 foreign keys that could individually different, so what I was thinking something like this which does not work;
@For Each item as tblMember in Model
@Html.DisplayFor(Function(m) item.MIN_SIZE_ID.tblSize.Size) 'THIS SHOULD FK TO MINIMUM
@Html.DisplayFor(Function(m) item.MAX_SIZE_ID.tblSize.Size) 'THIS SHOULD FK TO MAXIMUM
Next
If I try the above then I get error on the tblSize.Size. Without the tblSize using MIN_SIZE_ID only I will get the ID passed to the output.