Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DbContext Constructor (String)

Entity Framework 5.0

Constructs a new context instance using the given string as the name or connection string for the database to which a connection will be made. For more information on how this is used to create a connection, see the remarks section for DbContext.

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

public DbContext(
	string nameOrConnectionString
)

Parameters

nameOrConnectionString
Type: System.String

Either the database name or a connection string.

Show:
© 2015 Microsoft