0

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.

enter image description here

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

in your DB, key ExcersiseSessionTOLatLon - where it is ? to achieve one to many relation between ExcersiseSession and LatLons, it have to be in LatLon (ExcersiseSessionId, pointing to ExcersiseSession). But from its name, i tend to think, you have LatLonId in the table ExcersiseSession

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.