caching - NHibernate L2 Cache configuration in Fluent NHibernate -
Is it possible for TI to configure L2 cache provider in code via FHN?
The following config after I'm doing.
Return Fluently.Configure (). Database (MsSqlConfiguration.MsSql2005.ConnectionString (c = & gt; c.FromConnectionStringWithKey ("Temporary")) ShowSql ()). Mapping (M => M. Fluent Mappings.AdfomAssandAfalfand ()). Experience Configuration (C => {}) .BuildSessionFactory ();
Cheers
AWC
This possible FNH, 'cash down examples' View properties:
return Fluently.Configure (fileConfiguration) .Database (MsSqlConfiguration .MsSql2005 .ConnectionString (c = & gt; c.FromConnectionStringWithKey ( " Temporary ")) .ShowSql () .Cache (c => c.ProviderClass (typeof (NHibernate.Cache.HashtableCacheProvider) .assemblyQualifiedName) .UseQueryCache ())) .Mappings (M => m.FluentMappings.AddFromAssemblyOf & LT; IMAP & gt; ()) .ExposeConfiguration (c = & gt; {c.EventListeners.PostLoadEventListeners = new IPostLoadEventListener [] {new TestPostLoadListener ()};}) .BuildSessionFactory ();
Cheers
ABC
Note, for Fluent NIBnet> = 3.4.0.0 It appears that the configuration is slightly different .
Use the nuget package for SysCache return to Fluently.Configure (fileConfiguration). Database (MsSqlConfiguration .MsSql2005. ConnectionString (c = & gt; c.FromConnectionStringWithKey ("Temporary")). Sovskl ()) Kkas (a = & gt; Kkproviderclas & lt; Sikcheprovider & gt; (). Usekwerikache ()). Mapping (M => m.FluentMappings.AddFromAssemblyOf & lt; IMap & gt; ()) .xposeConfiguration (c => {c.EventListeners.postLoadEventListeners = New IPostLoadEventListener [] {New TestPostLoadListener ()};}) Kbildsessionfktori ();
Comments
Post a Comment