0
在我的数据库中,每个表都属于一个模式(例如Person)。我使用Fluent NHibernate和Automapping,我的问题是如何设置我想要使用的模式。如何用Fluent NHibernate自动搜索更改模式
在我的数据库中,每个表都属于一个模式(例如Person)。我使用Fluent NHibernate和Automapping,我的问题是如何设置我想要使用的模式。如何用Fluent NHibernate自动搜索更改模式
使用convention,特别是IClassConvention
。
public class SchemaConvention : IClassConvention
{
public void Apply(IClassInstance instance)
{
instance.Schema("schemaNameGoesHere");
}
}