LocalDbConnectionFactory Constructor

 

Initializes a new instance of the LocalDbConnectionFactory class.

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

NameDescription
System_CAPS_pubmethodLocalDbConnectionFactory(String)

Creates a new instance of the connection factory for the given version of LocalDb. For SQL Server 2012 LocalDb use "v11.0". For SQL Server 2014 and later LocalDb use "mssqllocaldb".

System_CAPS_pubmethodLocalDbConnectionFactory(String, String)

Creates a new instance of the connection factory for the given version of LocalDb. For SQL Server 2012 LocalDb use "v11.0". For SQL Server 2014 and later LocalDb use "mssqllocaldb".


LocalDbConnectionFactory Constructor (String)

Creates a new instance of the connection factory for the given version of LocalDb. For SQL Server 2012 LocalDb use "v11.0". For SQL Server 2014 and later LocalDb use "mssqllocaldb".

public LocalDbConnectionFactory(
	string localDbVersion
)

Parameters

localDbVersion
Type: System.String

The LocalDb version to use.


LocalDbConnectionFactory Constructor (String, String)

Creates a new instance of the connection factory for the given version of LocalDb. For SQL Server 2012 LocalDb use "v11.0". For SQL Server 2014 and later LocalDb use "mssqllocaldb".

public LocalDbConnectionFactory(
	string localDbVersion,
	string baseConnectionString
)

Parameters

localDbVersion
Type: System.String

The LocalDb version to use.

baseConnectionString
Type: System.String

The connection string to use for options to the database other than the 'Initial Catalog', 'Data Source', and 'AttachDbFilename'. The 'Initial Catalog' and 'AttachDbFilename' will be prepended to this string based on the database name when CreateConnection is called. The 'Data Source' will be set based on the LocalDbVersion argument.