Filter all navigation properties before they are loaded (lazy or eager) into memory

后端 未结 3 397
有刺的猬
有刺的猬 2021-01-30 04:24

For future visitors: for EF6 you are probably better off using filters, for example via this project: https://github.com/jbogard/EntityFramework.Filters

In the applicati

3条回答
  •  长情又很酷
    2021-01-30 04:58

    Have you considered using views in your database to load your problem entities with the deleted items excluded?

    It does mean you will need to use stored procedures to map INSERT/UPDATE/DELETE functionality, but it would definitely solve your problem if Workout maps to a View with the deleted rows omitted. Also - this may not work the same in a code first approach...

提交回复
热议问题