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.
- 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.