System.Data.Entity.Internal.LazyInternalContext.LazyInternalContext C# (CSharp) Method

LazyInternalContext() public method

Constructs a LazyInternalContext for the given DbContext owner that will be initialized on first use.
public LazyInternalContext ( DbContext owner, IInternalConnection internalConnection, DbCompiledModel model, IDbModelCacheKey>.Func cacheKeyFactory = null, System.Data.Entity.ModelConfiguration.Utilities.AttributeProvider attributeProvider = null, Lazy dispatchers = null, ObjectContext objectContext = null ) : System.Collections.Concurrent
owner DbContext // The owner . //
internalConnection IInternalConnection Responsible for creating a connection lazily when the context is used for the first time.
model DbCompiledModel The model, or null if it will be created by convention
cacheKeyFactory IDbModelCacheKey>.Func
attributeProvider System.Data.Entity.ModelConfiguration.Utilities.AttributeProvider
dispatchers Lazy
objectContext ObjectContext
return System.Collections.Concurrent
        public LazyInternalContext(
            DbContext owner,
            IInternalConnection internalConnection,
            DbCompiledModel model,
            Func<DbContext, IDbModelCacheKey> cacheKeyFactory = null,
            AttributeProvider attributeProvider = null,
            Lazy<DbDispatchers> dispatchers = null,
            ObjectContext objectContext = null)
            : base(owner, dispatchers)
        {
            DebugCheck.NotNull(internalConnection);

            _internalConnection = internalConnection;
            _model = model;
            _cacheKeyFactory = cacheKeyFactory ?? new DefaultModelCacheKeyFactory().Create;
            _attributeProvider = attributeProvider ?? new AttributeProvider();
            _objectContext = objectContext;

            _createdWithExistingModel = model != null;

            LoadContextConfigs();
        }