0

I've added a new table to my database then why I tried to update my EF entity model it showed that table as a new table in the list but and I select it but it wasn't being added yet

I checked the relations and keys I deleted the entity and re-created it again

here's my uml in database

here's my uml in database

and this is how the EF generates it, it misses the TeachersCourses table and this is how the EF generates it, it misses the TeachersCourses table

Community
  • 1
  • 1
Mahmoud Zakal
  • 128
  • 3
  • 15

1 Answers1

0

It didn't miss the TeachersCourses table :-). It correctly created a navigation property on Teacher, called Courses. That's how a many to many foreign key relationship is represented in EF when your db schema is well done. Many teachers to many courses.

My only comment is to correct the spelling of the Course entity

reckface
  • 5,678
  • 4
  • 36
  • 62