© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
38 replies
sspirit

✅ EF Core Relationship

I have 3 different models call Owner, Products and Warranty.
The relationship between them is that Products can be created independently, so when a user purchase a product Owner table will have foreign key ProductsId inside it. During product purchase a new Warranty is created so OwnerId will be a foreign key in Warranty table.

How do I declare this in model and the relationship at ApplicationDbContext? I'm having trouble due to wrongly created model and unable to submit the form from my Angular application.

Model become more complex after implementing navigation property which now makes me unable to create a Owner
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 Nullable Foreign Key Relationship
C#CC# / help
7mo ago
❔ EF Core Code-first relationships
C#CC# / help
4y ago
❔ Polymorphic relationships in EF Core / .NET Core
C#CC# / help
3y ago