开发者

How to set the Property: hbm2dll.auto?

开发者 https://www.devze.com 2023-02-24 23:29 出处:网络
I would like to set the following property: Property: hbm2dll.auto validate = validates the whole database schema

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消