In our previous sample, the validation rule will be apply on SaveChanges when the entity is Added or Modified.
But perhaps we also want to apply it on Delete or perhaps we just want to apply it on Add.
It’s possible with WAQS to change the default case (Modified and Added) using two new attributes: ValidateOnServer and ValidateOnClient.
[ValidateOnServer(Mode = ValidateMode.OnInsert | ValidateMode.OnUpdate)]
[ValidateOnClient(Mode = ValidateMode.OnInsert)]
As we showed in previous posts, you have to transform T4 templates after changing your specifications.