DataSink.ValidateTargetModel Method
Performs basic validation on the target database to ensure that it is possible to run the data generation plan on the target.
Namespace: Microsoft.Data.Schema.Tools.DataGenerator
Assembly: Microsoft.Data.Schema.Tools (in Microsoft.Data.Schema.Tools.dll)
Syntax
'Declaration
Protected Function ValidateTargetModel ( _
planModel As DataSchemaModel, _
dgenServices As DataGenerationServices, _
connString As String, _
<OutAttribute> ByRef errors As List(Of DataSchemaError) _
) As Boolean
protected bool ValidateTargetModel(
DataSchemaModel planModel,
DataGenerationServices dgenServices,
string connString,
out List<DataSchemaError> errors
)
protected:
bool ValidateTargetModel(
DataSchemaModel^ planModel,
DataGenerationServices^ dgenServices,
String^ connString,
[OutAttribute] List<DataSchemaError^>^% errors
)
member ValidateTargetModel :
planModel:DataSchemaModel *
dgenServices:DataGenerationServices *
connString:string *
errors:List<DataSchemaError> byref -> bool
protected function ValidateTargetModel(
planModel : DataSchemaModel,
dgenServices : DataGenerationServices,
connString : String,
errors : List<DataSchemaError>
) : boolean
Parameters
- planModel
Type: Microsoft.Data.Schema.SchemaModel.DataSchemaModel
A DataSchemaModel representing the target database.
- dgenServices
Type: Microsoft.Data.Schema.Tools.DataGenerator.DataGenerationServices
A DataGenerationServices object for the source database.
- connString
Type: System.String
The target database connection string.
- errors
Type: System.Collections.Generic.List<DataSchemaError>%
(Output) A List<T> of DataSchemaError objects containing the errors that occurred while validating the target model.
Return Value
Type: System.Boolean
true if the data sink can save to the target model; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | One or more of the input parameters is nulla null reference (Nothing in Visual Basic), or the connString parameter is an empty string. |
Remarks
In a derived class, this ValidateTargetModel method can be called from the OnValidateTarget method, or it can implement an entirely new validation process.
The following are some of the basic validations performed by this method:
Verify that the selected tables are in the target.
Verify that the selected columns are in the target.
Verify that the assigned generators can be loaded.
Verify that the assigned generator is valid for the column type and is correctly configured.
.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.
See Also
Reference
Microsoft.Data.Schema.Tools.DataGenerator Namespace
ValidateTargetModel