Beispiel #1
0
        public IQueryable <T> Cache <T>(LNF.DataAccess.CacheMode mode = LNF.DataAccess.CacheMode.Normal) where T : IDataItem
        {
            NHibernate.CacheMode cm = (NHibernate.CacheMode)mode;

            return(Session.Query <T>().WithOptions(opts =>
            {
                opts.SetCacheable(true);
                opts.SetCacheMode(cm);
            }));
        }
 internal NHibernateReadonlyRepository(IUnitOfWork uow, Vaiona.Persistence.Api.CacheMode cacheMode)
 {
     this.UoW       = uow;
     this.cacheMode = (NHibernate.CacheMode)Enum.Parse(typeof(NHibernate.CacheMode), Enum.GetName(typeof(Vaiona.Persistence.Api.CacheMode), cacheMode));
 }