DatabaseTestService.GenerateData Method (String, Boolean, String, String)
Generates data to the specified database using the referenced data generation plan.
Namespace: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting
Assembly: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting (in microsoft.visualstudio.teamsystem.data.unittesting.dll)
Syntax
'Declaration
Protected Shared Sub GenerateData ( _
dgenFileName As String, _
clearDatabase As Boolean, _
providerInvariantName As String, _
connectionString As String _
)
'Usage
Dim dgenFileName As String
Dim clearDatabase As Boolean
Dim providerInvariantName As String
Dim connectionString As String
DatabaseTestService.GenerateData(dgenFileName, clearDatabase, providerInvariantName, connectionString)
protected static void GenerateData (
string dgenFileName,
bool clearDatabase,
string providerInvariantName,
string connectionString
)
protected:
static void GenerateData (
String^ dgenFileName,
bool clearDatabase,
String^ providerInvariantName,
String^ connectionString
)
protected static void GenerateData (
String dgenFileName,
boolean clearDatabase,
String providerInvariantName,
String connectionString
)
protected static function GenerateData (
dgenFileName : String,
clearDatabase : boolean,
providerInvariantName : String,
connectionString : String
)
Parameters
- dgenFileName
The data generator file used to populate the database.
- clearDatabase
If TRUE, the database is cleared before applying new data.
- providerInvariantName
The database client provider that will be used to connect to the database. This must be System.Data.SqlClient.
- connectionString
The connection string for the target database. This must be a connection string to a SQL database.
Remarks
This method generates data in the database project if the necessary information has been added to the app.config file using the classes provided in the Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.Configuration namespace.
A privileged connection context is used to generate the data.
See Also
Reference
DatabaseTestService Class
DatabaseTestService Members
Microsoft.VisualStudio.TeamSystem.Data.UnitTesting Namespace