Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IDbConnectionFactory Interface

Entity Framework 5.0

Implementations of this interface are used to create DbConnection objects for a type of database server based on a given database name. An Instance is set on the Database class to cause all DbContext objects to be created with no connection information or just a database name or connection string to use a certain type of database server by default. Two implementations of this interface are provided SqlConnectionFactory which is used to create connections to Microsoft SQL Server, including EXPRESS editions, and SqlCeConnectionFactory which is used to create connections to Microsoft SQL Server Compact Editions. Other implementations for other database servers can be added as needed. Implementations should be thread safe or immutable since they may be accessed by multiple threads at the same time.

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

The IDbConnectionFactory type exposes the following members.

  NameDescription
Public methodCreateConnectionCreates a connection based on the given database name or connection string.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.