0

I'm trying to set up my EF Model. I have 2 tables: Posts and Comments. I right clicked and added an association and I see a new column was generated "PostPostID". Is this necessary? Can I delete it? When I do, I get this error: There is no property with name 'PostsPostID' defined in type referred by Role 'Comments'.
enter image description here
Thank you.

Rivka
  • 2,172
  • 10
  • 45
  • 74

1 Answers1

1

That column was added as Foreign Key to your association but you probably already have foreign key as part of the entity - PostID. You will need to map PostID as FK for the new association.

Community
  • 1
  • 1
Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670