Reputation: 1311
I have Table A and Table B on SQL Server.
Table B has an foreign key to Table A.
I want to cascade delete Table B itens when I delete a Table A item.
How to set this on SQL Server and on Entity Data Model?
Upvotes: 2
Views: 2717
Reputation: 6390
Set CASCADE on the relationship in the Entity Model Designer...
Upvotes: 0
Reputation: 51514
On the SQL server, set the Delete Rule
in INSERT and UPDATE specification
on the relationship property to Cascade
.
Upvotes: 1