Table per type in fluent nhibernate using IAutoMappingOverri

本文关键字:nhibernate using IAutoMappingOverri fluent in per type Table | 更新日期: 2023-09-27 18:33:49

是否可以使用流利的nhibernate仅使用IAutoMappingOverpreme接口创建每个类型的表映射?我真的很想避免为我的模型写出完整的映射。

Table per type in fluent nhibernate using IAutoMappingOverri

不使用IAutomappingOverride而是使用自动映射配置

class MyAutomappingConfiguration : DefaultAutomappingConfiguration
{
    public override bool IsDiscriminated(Type type)
    {
        return false; // or whatever classes it should discriminate instead of table per type
    }
}