Export (0) Print
Expand All

DataSourceAttribute Constructor (String, String)

Initializes a new instance of the DataSourceAttribute class. This instance will be initialized with a connection string and table name.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public DataSourceAttribute(
	string connectionString,
	string tableName
)

Parameters

connectionString
Type: System.String

Data provider-specific connection string.

tableName
Type: System.String

The name of the data table.

It is important to note that properties are set at initialization for this object. This constructor overload uses the default value of System.Data.OleDb for the data provider name and uses the default value of Random for the data access method.

NoteNote

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