Ejemplo n.º 1
0
        public NHibernateSessionAttribute()
        {
            if (HttpContext.Current == null || HttpContext.Current.Session == null)
            {
                return;
            }

            var cache = new HttpSessionStateCache(new HttpSessionStateWrapper(HttpContext.Current.Session));

            ObjectFactory.Configure(x => x.For <ISessionStateCache>().Use(cache));
        }
Ejemplo n.º 2
0
 public void Init()
 {
     _context    = Isolate.Fake.Instance <HttpSessionStateBase>();
     _stateCache = new HttpSessionStateCache(_context);
 }