You can also use
HasKey(u => new { u.SubscriptionID, u.UserName });
Edit:
One limitation that I discovered is this:
public ProjectAssignmentConfiguration() { HasKey(u => u.Employee.EmployeeId); HasKey(u => u.Project.ProjectId); }
or
public ProjectAssignmentConfiguration() { HasKey(u => new { u.Employee.EmployeeId, u.Project.ProjectId }); }
So, how do you set up an entity where in the connection table there is a primary key consisting of foreign keys?
djskinner May 26 '10 at 12:29 2010-05-26 12:29
source share