DbContextInfo Constructor

 

Initializes a new instance of the DbContextInfo class.

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodDbContextInfo(Type)

Initializes a new instance of the DbContextInfo class with specified context type.

System_CAPS_pubmethodDbContextInfo(Type, Configuration)

Initializes a new instance of the DbContextInfo class with specified context type and configuration file.

System_CAPS_pubmethodDbContextInfo(Type, Configuration, DbConnectionInfo)

Initializes a new instance of the DbContextInfo class using the specified connection information, context type and configuration file.

System_CAPS_pubmethodDbContextInfo(Type, Configuration, DbProviderInfo)

Initializes a new instance of the DbContextInfo class using the specified context type, configuration file, and provider information.

System_CAPS_pubmethodDbContextInfo(Type, ConnectionStringSettingsCollection)

Obsolete.Initializes a new instance of the DbContextInfo class using the specified context type and setting for the connection string.

System_CAPS_pubmethodDbContextInfo(Type, DbConnectionInfo)

Initializes a new instance of the DbContextInfo class using the specified context type and connection information..

System_CAPS_pubmethodDbContextInfo(Type, DbProviderInfo)

Initializes a new instance of the DbContextInfo class using the specified context type and provider information.


DbContextInfo Constructor (Type)

Initializes a new instance of the DbContextInfo class with specified context type.

public DbContextInfo(
	Type contextType
)

Parameters

contextType
Type: System.Type

The concrete DbContext type.


DbContextInfo Constructor (Type, Configuration)

Initializes a new instance of the DbContextInfo class with specified context type and configuration file.

public DbContextInfo(
	Type contextType,
	Configuration config
)

Parameters

contextType
Type: System.Type

The concrete DbContext type.

config
Type: System.Configuration.Configuration

An object representing the config file.


DbContextInfo Constructor (Type, Configuration, DbConnectionInfo)

Initializes a new instance of the DbContextInfo class using the specified connection information, context type and configuration file.

public DbContextInfo(
	Type contextType,
	Configuration config,
	DbConnectionInfo connectionInfo
)

Parameters

contextType
Type: System.Type

The type deriving from DbContext.

config
Type: System.Configuration.Configuration

An object representing the config file.

connectionInfo
Type: System.Data.Entity.Infrastructure.DbConnectionInfo

Connection information for the database to be used.


DbContextInfo Constructor (Type, Configuration, DbProviderInfo)

Initializes a new instance of the DbContextInfo class using the specified context type, configuration file, and provider information.

public DbContextInfo(
	Type contextType,
	Configuration config,
	DbProviderInfo modelProviderInfo
)

Parameters

contextType
Type: System.Type

The type deriving from DbContext.

config
Type: System.Configuration.Configuration

An object representing the config file.

modelProviderInfo
Type: System.Data.Entity.Infrastructure.DbProviderInfo

A DbProviderInfo specifying the underlying ADO.NET provider to target.


DbContextInfo Constructor (Type, ConnectionStringSettingsCollection)

Note: This API is now obsolete.

Initializes a new instance of the DbContextInfo class using the specified context type and setting for the connection string.

[ObsoleteAttribute("The application configuration can contain multiple settings that affect the connection used by a DbContext. To ensure all configuration is taken into account, use a DbContextInfo constructor that accepts System.Configuration.Configuration")]
public DbContextInfo(
	Type contextType,
	ConnectionStringSettingsCollection connectionStringSettings
)

Parameters

contextType
Type: System.Type

The type deriving from DbContext.

connectionStringSettings
Type: System.Configuration.ConnectionStringSettingsCollection

A collection of connection strings.

It is preferable to use the constructor that accepts the entire config document instead of using this constructor. Providing the entire config document allows DefaultConnectionFactroy entries in the config to be found in addition to explicitly specified connection strings.


DbContextInfo Constructor (Type, DbConnectionInfo)

Initializes a new instance of the DbContextInfo class using the specified context type and connection information..

public DbContextInfo(
	Type contextType,
	DbConnectionInfo connectionInfo
)

Parameters

contextType
Type: System.Type

The type deriving from DbContext.

connectionInfo
Type: System.Data.Entity.Infrastructure.DbConnectionInfo

Connection information for the database to be used.


DbContextInfo Constructor (Type, DbProviderInfo)

Initializes a new instance of the DbContextInfo class using the specified context type and provider information.

public DbContextInfo(
	Type contextType,
	DbProviderInfo modelProviderInfo
)

Parameters

contextType
Type: System.Type

The type deriving from DbContext.

modelProviderInfo
Type: System.Data.Entity.Infrastructure.DbProviderInfo

A DbProviderInfo specifying the underlying ADO.NET provider to target.