Click here to Skip to main content
15,040,090 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

When using new mvc4 internet page project in VS 2012 you can create SQL database for simple membership (instead of using local file) and it works fine. After running it database will contain 5 tables. Because I can't find other way of manipulating users/roles other than through entities created for that database I bumped into another problem. Creation of entities fails on UsersInRoles. It doesn't create it. You can fix that by creating that entity first and adding all four later and reapplying code creation (with deleting some files first).

Problem is that now it shows error: "Two entities with possibly different keys are mapped to the same row" and I can't find solution for it.
Posted

1 solution

Solution not needed. UsersInRoles is a link table an as such is not included in creation of entities as table. It is expressed as association between tables.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900