Getting Fluent NHibernate To Build Database tables

前端 未结 2 1637
野的像风
野的像风 2021-01-17 01:11

I am building an app with ASP.NET MVC2, Fluent NHibernate, StructureMap, and PostgreSQL. I am a total newbie when it comes to Fluent NHibernate. I got a setup going from a c

2条回答
  •  北海茫月
    2021-01-17 01:51

    The FluentNhiberante SessionSource object exposes the CreateSchema.

    var sessionFactory = Fluently.Configure()...
    var sessionSource = new SessionSource(sessionFactory);
    sessionSource.BuildSchema()
    

提交回复
热议问题