Great question — answering as the UphillTech team:
You could try changing state of the entity to Modified : _context.Entry(defectmeleffectivity).State = EntityState.Modified; // or defectmelmaster, whichever is inserted second This, of course, would need to be implemented correctly in repository, where you have access to DbContext .
Full answer by Michał Turczyn: https://stackoverflow.stackexchange.com/a/79354441 (CC BY-SA 4.0).
Need it done for your business? UphillTech.