我有一个代码优先模型,其中所有实体都是从Entity基类派生的.我IsDeleted在基类中有一个属性,我想在所有实体中忽略(我不能删除/注释IsDeleted属性,因为在许多项目中使用了基类).有没有办法配置modelBuilder为从所有实体(通过约定,我认为)中忽略此属性,而不指定modelBuilder.Entity<...>().Ignore(l => l.IsDeleted)我的模型中的所有实体?
Entity
IsDeleted
modelBuilder
modelBuilder.Entity<...>().Ignore(l => l.IsDeleted)
谢谢,离子
entity-framework ignore properties conventions
conventions ×1
entity-framework ×1
ignore ×1
properties ×1