Search
Setup for Free
C
C#
❔ EFCore: One has mutliple Entities
Original message was deleted
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,156
Members
View on Discord
Similar Threads
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
P
Pobiega
•
9/12/23, 6:01 PM
thats because having such a table means its many to many
P
Pobiega
•
9/12/23, 6:01 PM
A
-
> list of B just means B gets an
AId
AId
property
K
Kroks
•
9/12/23, 6:03 PM
@Pobiega call
?
P
Pobiega
•
9/12/23, 6:03 PM
no
.
P
Pobiega
•
9/12/23, 6:03 PM
look at the generated table for that
P
Pobiega
look at the generated table for that
K
Kroks
•
9/12/23, 6:03 PM
yeah its dumb structure it dupes the category each time
K
Kroks
•
9/12/23, 6:04 PM
it should not dupe it
P
Pobiega
•
9/12/23, 6:04 PM
just set up a many to many via the model builder if thats what you want
K
Kroks
•
9/12/23, 6:04 PM
it should map categoryid
K
Kroks
•
9/12/23, 6:04 PM
with
K
Kroks
•
9/12/23, 6:04 PM
scrapetargetid
K
Kroks
•
9/12/23, 6:04 PM
then dupe fixed
K
Kroks
•
9/12/23, 6:05 PM
K
Kroks
•
9/12/23, 6:05 PM
here should be like that
P
Pobiega
•
9/12/23, 6:05 PM
whenever the default conventions dont work for you
, the answer is
always
to use the modelbuilder to configure your models
K
Kroks
•
9/12/23, 6:05 PM
ok how
P
Pobiega
•
9/12/23, 6:05 PM
https://learn.microsoft.com/en-us/ef/core/modeling/
P
Pobiega
•
9/12/23, 6:05 PM
specifically the relationships part
P
Pobiega
•
9/12/23, 6:06 PM
https://learn.microsoft.com/en-us/ef/core/modeling/relationships
A
Accord
•
9/13/23, 6:31 PM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.
AId
AId
Similar Threads
✅ Problem connecting entities on efcore
C
C# / help
15mo ago
❔ EFCore One-To-One
C
C# / help
3y ago
❔ EFCORE DESIGN ONE TO MANY
C
C# / help
3y ago
[EFCore] add many Parent entities with Child entities, How to connect them in single SaveChanges
C
C# / help
4y ago