WAQS: Validate methods and CUD

7 reasons to use WAQS

WAQS documentation

 

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.

This entry was posted in 16868. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>