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.
DataSourceAttribute Constructor (String^, String^, String^, DataAccessMethod)
Initializes a new instance of the DataSourceAttribute class. This instance will be initialized with a data provider, connection string, data table and data access method to access the data source.
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
public:
DataSourceAttribute(
String^ providerInvariantName,
String^ connectionString,
String^ tableName,
DataAccessMethod dataAccessMethod
)
Parameters
- providerInvariantName
-
Type:
System::String^
Invariant data provider name, such as System.Data.SqlClient.
- connectionString
-
Type:
System::String^
A data provider-specific connection string.
- tableName
-
Type:
System::String^
The name of the data table.
- dataAccessMethod
-
Type:
Microsoft.VisualStudio.TestTools.UnitTesting::DataAccessMethod
Specifies the order to access data. It takes a DataAccessMethod.
Note |
|---|
The connection string can contain sensitive data (for example, a password). The connection string is stored in plain text in source code and in the compiled assembly. Restrict access to the source code and assembly to protect this sensitive information. |
Show:
