Implicit

Adding the And.Specification() modifier will validate the property using the default Specification for that type.

Check(c => c.Address).Required().And.Specification();

Explicit

Check(c => c.Address).Required().And.Specification<InternationalAddress>();

Inline Specification

Check(c => c.Address).Required().And.Specification( spec =>
{
    spec.Check(address => address.Street).Required();
    spec.Check(address => address.State).Required();
    spec.Check(address => address.ZipCode).Required();
});

Last edited Jan 25, 2010 at 4:09 PM by TechnoAg, version 1

Comments

No comments yet.