MVC 3 EF 4.1 dbContext - Deleting one-to-many data object with non-nullable foreign-key relation

前端 未结 4 1226
梦毁少年i
梦毁少年i 2021-02-07 11:46

I am using MVC 3, EF 4.1, and dbContext. I need to know how to delete an entity in one-to-many relation with a non-nullable foreign-key.

When I Remove the child entity

4条回答
  •  别跟我提以往
    2021-02-07 12:28

    I solved the same problem following the section "Cascade Delete Rules on Relationships" at the MSDN guide page here http://msdn.microsoft.com/en-us/library/bb738695.aspx Hope tu be helpfull :D

提交回复
热议问题