Database Property

EntityConnection.Database Property

.NET Framework (current version)
 

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 override string Database { get; }

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:
© 2016 Microsoft