Remove the ID column from GroupMembers Create a PK for GroupMembers consisting of both GroupID and UserID Now right-click your model and update it from the DB The EF designer needs to know that the pair of GroupID and UserID is unique in order to get the cardinality right.
Remove the ID column from GroupMembers. Create a PK for GroupMembers consisting of both GroupID and UserID. Now right-click your model and update it from the DB.
The EF designer needs to know that the pair of GroupID and UserID is unique in order to get the cardinality right.
By making both fields in GroupMembers the primary key, I can now add to the table. Thanks for your help :-) Chris.
I am encountering a problem when I go to update an object in my database using Entity Framework. A user can be a member of a group, hence a Group contains Users. Both fields in GroupMembers are foreign keys relating back to the User ID and Group ID.
When I load this into Entity Framework, it is modelled correctly in that a Group object has a list of User objects, and each User object has a list of Group objects. To support the current operation. I have seen various pieces online advising to add an ID field to the GroupMembers table - however if I do that, I get a mapping error in EF that complains about the ID not being mapped to anything.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.