Share via


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 function GenerateData(
    dgenFileName : String, 
    clearDatabase : boolean, 
    providerInvariantName : String, 
    connectionString : String
)

Parameters

  • dgenFileName
    Type: System.String
    The data generator file used to populate the database.
  • clearDatabase
    Type: System.Boolean
    If TRUE, the database is cleared before applying new data.
  • connectionString
    Type: System.String
    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.

Permissions

See Also

Reference

DatabaseTestService Class

DatabaseTestService Members

GenerateData Overload

Microsoft.VisualStudio.TeamSystem.Data.UnitTesting Namespace