根據分析器需要24秒爲FluentConfiguration.BuildConfiguration
完成。下面是我用得到的代碼配置:流利NHIbernate凍結了很多
MsSqlConfiguration persistenceConfigurer = MsSqlConfiguration
.MsSql2005
.ConnectionString(connectionStringBuilder => connectionStringBuilder
.Server(server)
.Database(database)
.Username(userName)
.Password(password))
.ProxyFactoryFactory<ProxyFactoryFactory>()
.CurrentSessionContext<ThreadStaticSessionContext>()
.DoNot.ShowSql();
FluentConfiguration cfg = Fluently.Configure()
.Database(persistenceConfigurer)
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<ExecutorMap>());
return cfg.BuildConfiguration();
是19.是不是常見的功能NHibernate工作這麼長時間的地圖文件數?可能是我的錯嗎?什麼可能是錯的?
在此先感謝。
是否有人對此問題感興趣,請閱讀http://ayende.com/Blog/archive/2007/10/26/Real-World-NHibernate-Reducing-startup-times-for- large-amount-of.aspx和http://nhforge.org/blogs/nhibernate/archive/2009/03/13/an-improvement-on-sessionfactory-initialization.aspx – StuffHappens 2010-11-02 08:56:29