Class representing a connection for the conceptual layer. An entity connection may only be initialized once (by opening the connection). It is subsequently not possible to change the connection string, attach a new store connection, or change the store connection string.
public class EntityConnection : System.Data.Common.DbConnection
type EntityConnection = class inherit DbConnection
Public Class EntityConnection Inherits DbConnection
Initializes a new instance of the EntityConnection class.
|EntityConnection(MetadataWorkspace, DbConnection, Boolean)||
Constructs the EntityConnection from Metadata loaded in memory
Initializes a new instance of the EntityConnection class, based on the connection string.
Gets or sets the EntityConnection connection string.
Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error.
Gets the current transaction that this connection is enlisted in. May be null.
Gets the name of the current database, or the database that will be used after a connection is opened.
Gets the name or network address of the data source to connect to.
Gets the provider factory associated with EntityConnection
Gets a string that contains the version of the data source to which the client is connected.
Gets the state of the EntityConnection, which is set up to track the state of the underlying database connection that is wrapped by this EntityConnection.
Provides access to the underlying data source connection that is used by the EntityConnection object.
Begins a database transaction
Begins a transaction by using the underlying provider.
Begins a transaction with the specified isolation level by using the underlying provider.
Closes the connection to the database.
Create a new command object that uses this connection object
Cleans up this connection object
Enlists this EntityConnection in the specified transaction.
Establishes a connection to the data source by calling the underlying data provider's Open method.
Asynchronously establishes a connection to the data store by calling the Open method on the underlying data provider