LocalDbConnectionFactory.CreateConnection Method (String)

 

Creates a connection for SQL Server LocalDb based on the given database name or connection string. If the given string contains an '=' character then it is treated as a full connection string, otherwise it is treated as a database name only.

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

public DbConnection CreateConnection(
	string nameOrConnectionString
)

Parameters

nameOrConnectionString
Type: System.String

The database name or connection string.

Return Value

Type: System.Data.Common.DbConnection

An initialized DbConnection.