How to set the Property: hbm2dll.auto?
I would like to set the following property:
Property: hbm2dll.auto
- validate = validates the whole database schema
- create = creates the whole 开发者_Go百科database schema
How I can do this with Fluent NHibernate?
As far as I know this is not supported directly through the Fluent NHibernate API. However, you could just add it to the created configuration:
Configuration config = Fluently.Configure()
.Database(...)
.Mappings(m =>
{
...
})
.BuildConfiguration();
config.SetProperty(NHibernate.Cfg.Environment.Hbm2ddlAuto, "validate");
精彩评论