Problem with cascade delete using Entity Framework and System.Data.SQLite

前端 未结 4 1996
半阙折子戏
半阙折子戏 2020-12-10 02:44

I have a SQLite DB that is set up so when I delete a Person the delete is cascaded. This works fine when I manually delete a Person (all records that reference the PersonID

4条回答
  •  孤街浪徒
    2020-12-10 03:35

    You can use the navigation property only without using the foreign key property. The delete cascade does not solve the problem in code because your person object will not be marked as deleted.

提交回复
热议问题