© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
5 replies
restingphantom131

✅ Setting Foreign key as Primary Key (EF Core)

I want to set a foreign key as my primary key in a link table im using. How would I do this in EF Core? or would it be better to not have a key?
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ ef core foreign key problem
C#CC# / help
4y ago
EF Core Nullable Foreign Key Relationship
C#CC# / help
7mo ago
❔ Ef core creating shadow foreign key, why?
C#CC# / help
3y ago