SqlDatabaseTestService.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.Tools.Schema.Sql.UnitTesting
Assembly: Microsoft.Data.Tools.Schema.Sql.UnitTesting (in Microsoft.Data.Tools.Schema.Sql.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 StringSqlDatabaseTestService.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
)
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.
- providerInvariantName
Type: System.String
The database client provider that will be used to connect to the database. This must be System.Data.SqlClient.
- 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.