✅ ASP.NET API (EF Core) Relationships
Using the following example in my learnings, I'm struggling to make this work the way I want it to.
When using swagger to POST a new
What I'd like to do is provide just a
I'm not sure how to make that work?
When using swagger to POST a new
Employee, if I want to specify a related Company I have to Include all the fields from the Company table, and the API creates a new Company record along with the new Employee record. So this is what it requires right now:What I'd like to do is provide just a
Company.Id for an existing Company record... So something like the this to add a new Employee, which includes the id 100 of an existing Company record:I'm not sure how to make that work?