✅ 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
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