3
如何配置SysCache2二級緩存與流利的NHibernate配置?配置SysCache2與流利的NHibernate
private ISessionFactory CreateSessionFactory()
{
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(_connectionString)
.Cache(c => c.UseQueryCache())
.Dialect<FullTextSearchEnabledMsSql2008Dialect>()
.UseReflectionOptimizer())
.Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()))
.BuildSessionFactory();
}