tags:

views:

18

answers:

2

Hi,

I am learning LINQ to SQL.I created 2 tables Project and TimeLogs.TimeLog has projectid as foreign key.But, when I drag these 2 tables in designer, the classes generated do not reflect this relationship in the form of entityset.

regards

A: 

This can happen if your Project table doesn't have a primary key.

Randy Minder
A: 

This will happen if the timelog table doesn't have its foreign key relationship with the project table formally defined as a foreign key constraint in the database.

Cylon Cat