views:

3643

answers:

6

I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error:

Error   1   Error 11010: Association End 'OperatorAccess' is not mapped.    E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx    390 11  Brandi II

Not sure what it is I am doing wrong

+1  A: 

There's not a lot of information in your question, but, generally speaking, this means that there is an incompletely defined association. It could be that you have tried to map one table with a foreign key to another table, but have not mapped that other table. You can also get this error when you try to do table per type inheritance without carefully following the steps for implementing that feature.

Craig Stuntz
A: 
Sean
+2  A: 

Not sure of the answer, but I've just posted a similar question, which may at least help clarify the issue you are experiencing. http://stackoverflow.com/questions/475150/defining-an-entity-framework-11-association

Craig Fisher
A: 

I had to go back into the database itself and clarify the foreign key relationship

Sean
A: 

hello, i am having same problem .. did you solve this???

Nab
+3  A: 

The Entity Framework designer is terrible - I've had the same problem many times (and your problem too, Craig):

This happens when you have a many-to-one association which is improperly setup. They could very easily fix the designer to make this process simple; but instead, we have to put up with this crap.


To fix:

  • Click on the association, and go to the mapping details view.
  • Under association, click on Maps to <tablename>. Choose the table(s) which make up the many side of the relationship (ie. the table(s) which make up the *-side of the association in the designer)
  • Under Column, choose the table-columns which map to each entity-side Property. You get this error when one of those entries are blank.
BlueRaja - Danny Pflughoeft