0

We're using Entity Framework Core 7 along with EF Core Power tools to reverse engineer our SQL Sever db. We have a many to many relationship in our db: Staff -> Role which in db has a mapping table in between StaffRole.

When running EF core power tools I see it making 3 tables, one of each, with Staff having a Collection of StaffRoles and StaffRole has a link to both Staff and Role. Role again has a Collection of StaffRoles.

I wanted to use Skip Navigation to avoid the StaffRole link being there in both Staff and Role, is that possible with EF Core PowerTools? I have the "Use many to many entity (EF Core 6 or later)" option.

Screenshots (here the option is unchecked, but same results if checked or unchecked): enter image description here enter image description here enter image description here

TbStaff has: enter image description here

TbRole has: enter image description here

DbContext OnModelCreating has the below for the TbStaffRole table: enter image description here

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
Paritosh
  • 4,243
  • 7
  • 47
  • 80
  • [Please don't post code, exceptions, or results as images](https://meta.stackoverflow.com/questions/285551). They can't be copied (partly) for answering and their "text" won't appear in search engines. Images should only be used as a last resort. – Gert Arnold Dec 12 '22 at 19:56

1 Answers1

0

Yes, just uncheck that option and you will not get the extra entity generated.

ErikEJ
  • 40,951
  • 5
  • 75
  • 115