Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Many to many with EF core 7 #332

Open
DomagojJugovich opened this issue Dec 9, 2022 · 1 comment
Open

Many to many with EF core 7 #332

DomagojJugovich opened this issue Dec 9, 2022 · 1 comment
Labels
question Requesting information

Comments

@DomagojJugovich
Copy link

Is it possible to draw and generate code for many to many associations for EF 7.
EF 7 does not use explicit Entity for many to many table.
It uses only fluent API specification of that many to many table, I changed generated code from designer and it works , I just dont know how to do it in designer.

Many to many with tables Item and Tag with EF 7 Core :

modelBuilder.Entityglobal::RemoteMate.Persistence.Items()
.HasManyglobal::RemoteMate.Persistence.Tags(p => p.Tag)
.WithMany(p => p.Item)
.UsingEntity(j => j.ToTable("ItemTag"));

@msawczyn
Copy link
Owner

msawczyn commented Jan 4, 2023

Connect two classes with a bidirectional association and set each side's cardinality to "many". I suggest moving to EFDesigner2022, though, since we won't be enhancing this version in the future.

@msawczyn msawczyn added the question Requesting information label Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Requesting information
Projects
None yet
Development

No branches or pull requests

2 participants