gpt4 book ai didi

c# - Fluent NHibernate Joined-Subclass 问题

转载 作者:行者123 更新时间:2023-11-30 18:45:14 26 4
gpt4 key购买 nike

我有这门课

public class Address:Entity {
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Zip { get; set; }
public virtual string Phone { get; set; }
public virtual string Fax { get; set; }
public virtual string TaxId { get; set; }
}

作为

的基类
public class Location:Address {
public virtual string OfficeHours { get; set; }
public virtual string PatientAgeRestrictions { get; set; }
public virtual bool WheelchairAccess { get; set; }
public virtual string ContactPerson { get; set; }
}

然后我用它来构建我的模式。

Fluently.Configure()
.Mappings(m => {
m.AutoMappings.Add(
AutoPersistenceModel.MapEntitiesFromAssemblyOf<Provider>()
.Where(t => t.Namespace == "Entities")
.ConventionDiscovery.AddFromAssemblyOf<UnderscoreIdDelimiter>()
.WithSetup(s => {
s.IsBaseType =
type => type == typeof(Credentialing.Data.Entity);
})
);
})
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();

当我这样做时,列命名和表命名的约定没有应用到我的位置表。我错过了什么?

最佳答案

从修订版 531 开始似乎已修复。

关于c# - Fluent NHibernate Joined-Subclass 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/882820/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com