I have some tables and I can’t get them to map.
aspnet_Users
UserId<PK>
//Other Fields
Table A(intermediate table)
UserId<PK>
Table B
UserId<PK>
Field1
Field2
Field3
Yep when I add these 3 tables in I will either get a 1 to 1 relationship with
aspnet_users to Table A
or
Table A to Table B
I need to have
aspnetusers to Table A to Table B
I tried to add this association but it never works.
Error 3021: Problem in Mapping Fragment starting at line 168: Each of the following columns in TableA is mapped to multiple conceptual side properties:
How do I fix this?
If the intermediate table is just a relationship mapping table (has a aspUser.userid and tableb.userid column) Entity framework cuts it out and only displays aspnet_Users to TableB.
If it is as you say above then you should see a chain of all three tables.
In your database do you have foreign key relationships from aspnet_Users to tableA and Tablea to tableB?
1st relationship: aspnet_Users.UserID=TableA.UseID
2nd relationship: TableA.UserID=TableB.UseID
If you do this then refresh you Entity Data Model from the database and it should show three tables asp_users to tableA and tableA to tableB mapping. Note that you may have to close/reopen the edmx file to see the correct joins and the designer sometimes doesn’t refresh.