79120855

Date: 2024-10-24 07:47:58
Score: 2.5
Natty:
Report link

Just specify a cascade delete rule on the foreign key. If you are using a code-first approach you can do it on your db context: Cascade delete - EF Core

Otherwise directly in the database: SQL Server delete cascade

Have a look at

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: illy-W