EntityConnection Class
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.
Assembly: EntityFramework (in EntityFramework.dll)
System::MarshalByRefObject
System.ComponentModel::Component
System.Data.Common::DbConnection
System.Data.Entity.Core.EntityClient::EntityConnection
| Name | Description | |
|---|---|---|
![]() | EntityConnection() | Initializes a new instance of the EntityConnection class. |
![]() | EntityConnection(MetadataWorkspace^, DbConnection^) | Initializes a new instance of the EntityConnection class with a specified MetadataWorkspace and DbConnection. |
![]() | EntityConnection(MetadataWorkspace^, DbConnection^, Boolean) | Constructs the EntityConnection from Metadata loaded in memory |
![]() | EntityConnection(String^) | Initializes a new instance of the EntityConnection class, based on the connection string. |
| Name | Description | |
|---|---|---|
![]() | CanRaiseEvents | (Inherited from Component.) |
![]() | ConnectionString | Gets or sets the EntityConnection connection string.(Overrides DbConnection::ConnectionString.) |
![]() | ConnectionTimeout | Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error.(Overrides DbConnection::ConnectionTimeout.) |
![]() | Container | (Inherited from Component.) |
![]() | CurrentTransaction | Gets the current transaction that this connection is enlisted in. May be null. |
![]() | Database | Gets the name of the current database, or the database that will be used after a connection is opened.(Overrides DbConnection::Database.) |
![]() | DataSource | Gets the name or network address of the data source to connect to.(Overrides DbConnection::DataSource.) |
![]() | DbProviderFactory | Gets the provider factory associated with EntityConnection(Overrides DbConnection::DbProviderFactory.) |
![]() | DesignMode | (Inherited from Component.) |
![]() | Events | (Inherited from Component.) |
![]() | ServerVersion | Gets a string that contains the version of the data source to which the client is connected.(Overrides DbConnection::ServerVersion.) |
![]() | Site | (Inherited from Component.) |
![]() | State | 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.(Overrides DbConnection::State.) |
![]() | StoreConnection | Provides access to the underlying data source connection that is used by the EntityConnection object. |
| Name | Description | |
|---|---|---|
![]() | BeginDbTransaction(IsolationLevel) | Begins a database transaction(Overrides DbConnection::BeginDbTransaction(IsolationLevel).) |
![]() | BeginTransaction() | Begins a transaction by using the underlying provider. |
![]() | BeginTransaction(IsolationLevel) | Begins a transaction with the specified isolation level by using the underlying provider. |
![]() | ChangeDatabase(String^) | Not supported.(Overrides DbConnection::ChangeDatabase(String^).) |
![]() | Close() | Closes the connection to the database.(Overrides DbConnection::Close().) |
![]() | CreateCommand() | Creates a new instance of an EntityCommand, with the Connection set to this EntityConnection . |
![]() | CreateDbCommand() | Create a new command object that uses this connection object(Overrides DbConnection::CreateDbCommand().) |
![]() | CreateObjRef(Type^) | (Inherited from MarshalByRefObject.) |
![]() | Dispose() | (Inherited from Component.) |
![]() | Dispose(Boolean) | Cleans up this connection object(Overrides Component::Dispose(Boolean).) |
![]() | EnlistTransaction(Transaction^) | Enlists this EntityConnection in the specified transaction.(Overrides DbConnection::EnlistTransaction(Transaction^).) |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Component.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | GetMetadataWorkspace() | Returns the MetadataWorkspace associated with this EntityConnection . |
![]() | GetSchema() | (Inherited from DbConnection.) |
![]() | GetSchema(String^) | (Inherited from DbConnection.) |
![]() | GetSchema(String^, array<String^>^) | (Inherited from DbConnection.) |
![]() | GetService(Type^) | (Inherited from Component.) |
![]() | GetType() | (Inherited from Object.) |
![]() | InitializeLifetimeService() | (Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | (Inherited from MarshalByRefObject.) |
![]() | OnStateChange(StateChangeEventArgs^) | (Inherited from DbConnection.) |
![]() | Open() | Establishes a connection to the data source by calling the underlying data provider's Open method.(Overrides DbConnection::Open().) |
![]() | OpenAsync() | (Inherited from DbConnection.) |
![]() | OpenAsync(CancellationToken) | Asynchronously establishes a connection to the data store by calling the Open method on the underlying data provider(Overrides DbConnection::OpenAsync(CancellationToken).) |
![]() | ToString() | (Inherited from Component.) |
| Name | Description | |
|---|---|---|
![]() | Disposed | (Inherited from Component.) |
![]() | StateChange | (Inherited from DbConnection.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IDbConnection::BeginTransaction() | (Inherited from DbConnection.) |
![]() ![]() | IDbConnection::BeginTransaction(IsolationLevel) | (Inherited from DbConnection.) |
![]() ![]() | IDbConnection::CreateCommand() | (Inherited from DbConnection.) |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.






