c# - Cascading delete in Entity Framework -


so have 2 tables, invoices , invoiceitems. when delete invoice, i'd related invoiceitems deleted well.

i updated relationship in sql server cascading delete when delete invoice. entity framework didn't recognize change, however, i've read need manually update edmx cascading delete.

well in design view of edmx, clicked on relationship between 2 tables, , checked properties try , set cascading delete

enter image description here

as can see, there 2 ondelete properties: end1 ondelete , end2 ondelete

which 1 need set cascade?

if end1 principal of relationship (i.e invoice has invoice items) makes sense cascade deletes.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -