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::DataSource Property

 

Gets the name or network address of the data source to connect to.

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

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

Property Value

Type: System::String^

The name of the data source. The default value is an empty string.

Exception Condition
InvalidOperationException

The underlying data provider is not known.

For the specific keyword value, such as DataSource, that maps to the DataSource 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