예제 #1
0
파일: MSSQLProvider.cs 프로젝트: webrot/CMS
        ProviderContext GetDataContext()
        {
            var dataContext = CallContext.Current.GetObject <ProviderContext>(ObjectKey);

            if (dataContext == null)
            {
                if (string.IsNullOrEmpty(ConnectionString))
                {
                    dataContext = new ProviderContext();
                }
                else
                {
                    dataContext = new ProviderContext(ConnectionString);
                }
                CallContext.Current.RegisterObject <ProviderContext>(ObjectKey, dataContext);
            }
            return(dataContext);
        }
예제 #2
0
파일: MSSQLProvider.cs 프로젝트: royaso/CMS
        ProviderContext GetDataContext()
        {
            var dataContext = CallContext.Current.GetObject<ProviderContext>(ObjectKey);

            if (dataContext == null)
            {
                if (string.IsNullOrEmpty(ConnectionString))
                {
                    dataContext = new ProviderContext();
                }
                else
                {
                    dataContext = new ProviderContext(ConnectionString);
                }
                CallContext.Current.RegisterObject<ProviderContext>(ObjectKey, dataContext);
            }
            return dataContext;
        }