using fluent-nhibernate and traditionally hbm.xml together

后端 未结 1 415
春和景丽
春和景丽 2021-01-26 22:32

So far I used this code to configure a session factory:

        Configuration configuration = new Configuration();
        configuration.Configure();
        Ses         


        
1条回答
  •  清歌不尽
    2021-01-26 23:09

        SessionFactory = Fluently.Configure(configuration).Mappings(m =>
    {
        m.FluentMappings.AddFromAssemblyOf();
        m.FluentMappings.AddFromAssemblyOf();
        m.FluentMappings.AddFromAssemblyOf();
        m.HbmMappings.AddFromAssemblyOf()
     }).BuildSessionFactory();
    

    0 讨论(0)
提交回复
热议问题