EntityConnection Class

Entity Framework 6.0
 

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.

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

System::Object
  System::MarshalByRefObject
    System.ComponentModel::Component
      System.Data.Common::DbConnection
        System.Data.Entity.Core.EntityClient::EntityConnection

public ref class EntityConnection : DbConnection

NameDescription
System_CAPS_pubmethodEntityConnection()

Initializes a new instance of the EntityConnection class.

System_CAPS_pubmethodEntityConnection(MetadataWorkspace^, DbConnection^)

Initializes a new instance of the EntityConnection class with a specified MetadataWorkspace and DbConnection.

System_CAPS_pubmethodEntityConnection(MetadataWorkspace^, DbConnection^, Boolean)

Constructs the EntityConnection from Metadata loaded in memory

System_CAPS_pubmethodEntityConnection(String^)

Initializes a new instance of the EntityConnection class, based on the connection string.

NameDescription
System_CAPS_protpropertyCanRaiseEvents

(Inherited from Component.)

System_CAPS_pubpropertyConnectionString

Gets or sets the EntityConnection connection string.(Overrides DbConnection::ConnectionString.)

System_CAPS_pubpropertyConnectionTimeout

Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error.(Overrides DbConnection::ConnectionTimeout.)

System_CAPS_pubpropertyContainer

(Inherited from Component.)

System_CAPS_pubpropertyCurrentTransaction

Gets the current transaction that this connection is enlisted in. May be null.

System_CAPS_pubpropertyDatabase

Gets the name of the current database, or the database that will be used after a connection is opened.(Overrides DbConnection::Database.)

System_CAPS_pubpropertyDataSource

Gets the name or network address of the data source to connect to.(Overrides DbConnection::DataSource.)

System_CAPS_protpropertyDbProviderFactory

Gets the provider factory associated with EntityConnection(Overrides DbConnection::DbProviderFactory.)

System_CAPS_protpropertyDesignMode

(Inherited from Component.)

System_CAPS_protpropertyEvents

(Inherited from Component.)

System_CAPS_pubpropertyServerVersion

Gets a string that contains the version of the data source to which the client is connected.(Overrides DbConnection::ServerVersion.)

System_CAPS_pubpropertySite

(Inherited from Component.)

System_CAPS_pubpropertyState

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.)

System_CAPS_pubpropertyStoreConnection

Provides access to the underlying data source connection that is used by the EntityConnection object.

NameDescription
System_CAPS_protmethodBeginDbTransaction(IsolationLevel)

Begins a database transaction(Overrides DbConnection::BeginDbTransaction(IsolationLevel).)

System_CAPS_pubmethodBeginTransaction()

Begins a transaction by using the underlying provider.

System_CAPS_pubmethodBeginTransaction(IsolationLevel)

Begins a transaction with the specified isolation level by using the underlying provider.

System_CAPS_pubmethodChangeDatabase(String^)

Not supported.(Overrides DbConnection::ChangeDatabase(String^).)

System_CAPS_pubmethodClose()

Closes the connection to the database.(Overrides DbConnection::Close().)

System_CAPS_pubmethodCreateCommand()

Creates a new instance of an EntityCommand, with the Connection set to this EntityConnection .

System_CAPS_protmethodCreateDbCommand()

Create a new command object that uses this connection object(Overrides DbConnection::CreateDbCommand().)

System_CAPS_pubmethodCreateObjRef(Type^)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Cleans up this connection object(Overrides Component::Dispose(Boolean).)

System_CAPS_pubmethodEnlistTransaction(Transaction^)

Enlists this EntityConnection in the specified transaction.(Overrides DbConnection::EnlistTransaction(Transaction^).)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Component.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetMetadataWorkspace()

Returns the MetadataWorkspace associated with this EntityConnection .

System_CAPS_pubmethodGetSchema()

(Inherited from DbConnection.)

System_CAPS_pubmethodGetSchema(String^)

(Inherited from DbConnection.)

System_CAPS_pubmethodGetSchema(String^, array<String^>^)

(Inherited from DbConnection.)

System_CAPS_protmethodGetService(Type^)

(Inherited from Component.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnStateChange(StateChangeEventArgs^)

(Inherited from DbConnection.)

System_CAPS_pubmethodOpen()

Establishes a connection to the data source by calling the underlying data provider's Open method.(Overrides DbConnection::Open().)

System_CAPS_pubmethodOpenAsync()

(Inherited from DbConnection.)

System_CAPS_pubmethodOpenAsync(CancellationToken)

Asynchronously establishes a connection to the data store by calling the Open method on the underlying data provider(Overrides DbConnection::OpenAsync(CancellationToken).)

System_CAPS_pubmethodToString()

(Inherited from Component.)

NameDescription
System_CAPS_pubeventDisposed

(Inherited from Component.)

System_CAPS_pubeventStateChange

(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.

Return to top
Show: