✅ 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?
No description
No description
No description
3 Replies
TrattTratt
TrattTratt8mo ago
What do you want the table to do?, is it a many to many relationship table? Then I usually dont use the [Key] and it works (not sure if I can help you im a noob lol but im here to learn)
restingphantom
restingphantomOP8mo ago
this is the first time working with a more complex ef core project as well but I did excactly like you said (just making it a table without a key) and i think thats the right option now how do I close the question?
Pobiega
Pobiega8mo ago
just /close
Want results from more Discord servers?
Add your server