Can anyone help?
My problem is this...
I am attempting to perform Instatnce verification on a object which uses verifiers. Here is the code i'm using to perform the verification:
[Bindable(false)]
[Display(AutoGenerateField = false)]
public bool Validate()
{
// Verify entity.
var results = VerifierEngine.Execute(this);
return results.Ok;
;
}
All is well and I can see that the verifiers are working correctly. I would like to be able to identify which properties fail verification so that I can raise a ErrorsChanged event for each property.
The problem is that when using instance verification I cannot discover the TriggerMemberName or property names using:
var members = errors.Errors.Select(vr => vr.TriggerMemberName).Distinct()
as this information is not captured when you call VerifierEngine.Execute(this)
Any way around this, what should I be doing instead? Thanks