简体   繁体   中英

MVC 3 Entitiy - Model first DB problems

I am getting the following error when defining an association between my ExerciseSession and LatLons.

Basically i want a one- to- many relation between my:

  1. asp_net_user -> exerciseSession
  2. ExerciseSession -> LatLons

Is there a difference between an associations and a foreign key relation? and Can someone point to a tutorial which show how to create a 1 -> many relation in an existing .edmx Model Diagram?

Here is a picture to show everything that is going wrong.

在此处输入图片说明

Are you sure your foreign key have right "direction" ? From it name it looks it points from session to latlon, but from model it is obvious that it have to be in the opposite direction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM