Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EntityConnection::Database Property

 

Gets the name of the current database, or the database that will be used after a connection is opened.

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

public:
property String^ Database {
	virtual String^ get() override;
}

Property Value

Type: System::String^

The value of the Database property of the underlying data provider.

Exception Condition
InvalidOperationException

The underlying data provider is not known.

For the specific keyword value, such as Database, that maps to the Database property, see the documentation for the underlying data provider. For SQL Server equivalent keywords, see the documentation for the ConnectionString property.

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft