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)); }
public void Init() { _context = Isolate.Fake.Instance <HttpSessionStateBase>(); _stateCache = new HttpSessionStateCache(_context); }