[英]Table per type in fluent nhibernate using IAutoMappingOverride
Is it possible to create a Table Per Type mapping using fluent nhibernate with only the IAutoMappingOverride interface? 是否可以仅使用IAutoMappingOverride接口使用流利的nhibernate创建每个类型的表映射? I really want to avoid writing out a full mapping for my models.
我真的想避免为模型写出完整的映射。
Not using IAutomappingOverride
but with AutomappingConfiguration 不使用
IAutomappingOverride
而是使用IAutomappingOverride
class MyAutomappingConfiguration : DefaultAutomappingConfiguration
{
public override bool IsDiscriminated(Type type)
{
return false; // or whatever classes it should discriminate instead of table per type
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.