src/Shared/EntityFramework/Internal/LazyInternalConnection.cs
// <summary>
// Initializes the connection based on a connection string.
// </summary>
// <param name="appConfigConnection"> The settings to initialize from. </param>
Initializes the connection based on a connection string.
Initializes the connection based on a connection string .
private void InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection)
        {
            var providerInvariantName = appConfigConnection.ProviderName;
            if (String.IsNullOrWhiteSpace(providerInvariantName))
            {
                throw Error.DbContext_ProviderNameMissing(appConfigConnection.Name);
            }
            if (String.Equals(providerInvariantName, "System.Data.EntityClient", StringComparison.OrdinalIgnoreCase))
            {
                UnderlyingConnection = new EntityConnection(appConfigConnection.ConnectionString);
            }
            else
            {
                CreateConnectionFromProviderName(providerInvariantName);
                DbInterception.Dispatch.Connection.SetConnectionString(
                    UnderlyingConnection,
                    new DbConnectionPropertyInterceptionContext<string>().WithValue(appConfigConnection.ConnectionString));
            }
        }
private void InitializeFromConnectionStringSetting ( ConnectionStringSettings appConfigConnection ) { var providerInvariantName = appConfigConnection . ProviderName ; if ( String . IsNullOrWhiteSpace ( providerInvariantName ) ) { throw Error . DbContext_ProviderNameMissing ( appConfigConnection . Name ) ; } if ( String . Equals ( providerInvariantName , " " , StringComparison . OrdinalIgnoreCase ) ) { UnderlyingConnection = new EntityConnection ( appConfigConnection . ConnectionString ) ; } else { CreateConnectionFromProviderName ( providerInvariantName ) ; DbInterception . Dispatch . Connection . SetConnectionString ( UnderlyingConnection , new DbConnectionPropertyInterceptionContext < string > ( ) . WithValue ( appConfigConnection . ConnectionString ) ) ; } }
Initializes the connection based on a connection string.
Initializes the connection based on a connection string .
appConfigConnection
ConnectionStringSettings
The settings to initialize from.
The settings to initialize from .