One question about VAB!

Topics: Policy Injection Application Block, Validation Application Block
Jun 23, 2008 at 6:11 PM
I have follow scenario:
class Entity
{
[SomeValidator]
SomeProperty{get;set;}

[ValidationCallHandler]
void Save {}
}

And i want when i call Save method Entity object has been validated.
How can i do this with EL? I need advice
Jun 23, 2008 at 6:48 PM
Hi,

That's not really what the way PIAB's validation call handler works. It can be used to validate a method's parameters, not the object whose method is being invoked. You can either use a custom call handler that does it or invoke the validation logic directly from the Save method's implementation.

Fernando


pmatveev wrote:
I have follow scenario:
class Entity
{
[SomeValidator]
SomeProperty{get;set;}

[ValidationCallHandler]
void Save {}
}

And i want when i call Save method Entity object has been validated.
How can i do this with EL? I need advice


Jun 23, 2008 at 7:00 PM
Ok, ths for explanation