Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据库有多个模式,流利的 nhibernate faq 指出您可以为整个数据库或每个实体指定模式。我想为每个 AutoPersitenceModel 指定架构,可以这样做吗?
知道了:
public class SchemaConvention : IClassConvention { public void Apply(IClassInstance instance) { instance.Schema("schemaName"); } } AutoPersistenceModel model = AutoMap.AssemblyOf<Whatever>(); model.Conventions.AddFromAssemblyOf<SchemaConvention>();