DatabaseTestService.GenerateData Method (String, Boolean, String, String)

When overridden in a derived class, generates data to the specified database by using the referenced data generation plan.

Namespace:  Microsoft.Data.Schema.UnitTesting
Assembly:  Microsoft.Data.Schema.UnitTesting (in Microsoft.Data.Schema.UnitTesting.dll)

Syntax

'Declaration
Protected Shared Sub GenerateData ( _
    dgenFileName As String, _
    clearDatabase As Boolean, _
    providerInvariantName As String, _
    connectionString As String _
)
protected static void GenerateData(
    string dgenFileName,
    bool clearDatabase,
    string providerInvariantName,
    string connectionString
)
protected:
static void GenerateData(
    String^ dgenFileName, 
    bool clearDatabase, 
    String^ providerInvariantName, 
    String^ connectionString
)
static member GenerateData : 
        dgenFileName:string * 
        clearDatabase:bool * 
        providerInvariantName:string * 
        connectionString:string -> unit 
protected static function GenerateData(
    dgenFileName : String, 
    clearDatabase : boolean, 
    providerInvariantName : String, 
    connectionString : String
)

Parameters

  • dgenFileName
    Type: System.String
    The data generator file that is used to populate the database.
  • clearDatabase
    Type: System.Boolean
    If true, the database is cleared before new data is applied.
  • 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 by using the classes provided in the Microsoft.Data.Schema.UnitTesting.Configuration namespace.

A privileged connection context is used to generate the data.

.NET Framework Security

See Also

Reference

DatabaseTestService Class

GenerateData Overload

Microsoft.Data.Schema.UnitTesting Namespace

System.Data.SqlClient

Microsoft.Data.Schema.UnitTesting.Configuration