我基于以下链接来实现逻辑delet。https://github.com/rowanmiller/Demo-TechEd2014 问题是此解决方案会删除包含已删除字段的所有记录
[SoftDelete("IsDelete")]
public class Pusher
{
[Key]
public int IdPusher { get; set; }
public string Name { get; set; }
public bool IsDelete { get; set; }
}
[SoftDelete("IsDelete")]
public class Task
{
[Key]
public int IdTask { get; set; }
public int IdPusher { get; set; }
public virtual Pusher Pusher { get; set; }
public bool IsDelete { get; set; }
}
如果删除推送器,GetAll方法
将不再显示包含它的所有任务