Export (0) Print
Expand All
0 out of 6 rated this helpful - Rate this topic

Database.DefaultConnectionFactory Property

Entity Framework 5.0

The connection factory to use when creating a DbConnection from just a database name or a connection string.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)
static member DefaultConnectionFactory : IDbConnectionFactory with get, set

Property Value

Type: System.Data.Entity.Infrastructure.IDbConnectionFactory
The connection factory to use.

This is used when just a database name or connection string is given to DbContext or when the no database name or connection is given to DbContext in which case the name of the context class is passed to this factory in order to generate a DbConnection. The default connection factory creates a connection to SQL Express on the local machine. However, this default may be changed by an application framework.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.