fluent nhibernate - How do you automap database schema for a set of entities -
my database has multiple schemas, fluent nhibernate faq states can specify schema entire database, or per entity. want specify schema per autopersitencemodel, can done?
got it:
public class schemaconvention : iclassconvention { public void apply(iclassinstance instance) { instance.schema("schemaname"); } } autopersistencemodel model = automap.assemblyof<whatever>(); model.conventions.addfromassemblyof<schemaconvention>();
Comments
Post a Comment