Ejemplo n.º 1
0
        private static SimpleEfContextStorage GetSimpleSessionStorage()
        {
            var httpContext = HttpContext.Current;
            var storage = httpContext.Items[ConstKeys.EfDbContextStorageKey] as SimpleEfContextStorage;
            if (storage == null)
            {
                storage = new SimpleEfContextStorage();
                httpContext.Items[ConstKeys.EfDbContextStorageKey] = storage;
            }

            return storage;
        }
Ejemplo n.º 2
0
        private static SimpleEfContextStorage GetSimpleSessionStorage()
        {
            var httpContext = HttpContext.Current;
            var storage     = httpContext.Items[ConstKeys.EfDbContextStorageKey] as SimpleEfContextStorage;

            if (storage == null)
            {
                storage = new SimpleEfContextStorage();
                httpContext.Items[ConstKeys.EfDbContextStorageKey] = storage;
            }

            return(storage);
        }