Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
958 views
Welcome To Ask or Share your Answers For Others

1 Answer

On the SQL server, set the Delete Rule in INSERT and UPDATE specification on the relationship property to Cascade.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...