|
The Table Template generates a Validation Model, whereby business objects check integrity and consistency of their own data before they allow data updates to be performed.
The Validation Model consists of the following elements that are added to the POCO Class:
 | Generates an IsValid Property |
 | Generates a Validate Method |
 | Inside the Validation method the templates will map each Database Repository Validation into C# code |
 | For each Validation defined in your DataBase Repository it will generate a validation method (rule) to ensure that meta-data rule is applied during the validation process. |
 | If ILifeCycle is implemented, it vetoes update operations if the object validation rules are not passed. It ensures that validations are also enforced when using cascading updates. |
Template Options
Generate a Validation mechanism
This option allows you to suppress/remove all template Validation model from the generated output. This is meant only to be used when you have redefined the validation model and don't need this generate code.
Generate Database Repository Validations
When turned on this option will try to map the DataBase Repository validations. According to each validation type it will generate different validation code.
This is a more atomic option that allows you to control whether the template should generate or not the validation for this Project Item.
|