This project is read-only.
1
Vote

'SpecExpress.DSL.WithRuleBuilder<Library.Contact,string>' does not contain a definition for 'And' and no extension method 'And' accepting a first argument of type 'SpecExpress.DSL.WithRuleBuilder<Library.Contact,string>' could be found.

description

If I write "Check(c => c.FirstName).Required().And.MaxLength(100).And.IsAlpha();" then I got the following error:
'SpecExpress.DSL.WithRuleBuilder<Library.Contact,string>' does not contain a definition for 'And' and no extension method 'And' accepting a first argument of type 'SpecExpress.DSL.WithRuleBuilder<Library.Contact,string>' could be found.
 
But the following code works fine.
Error free Code: Check(p => p.FirstName).Required().MaxLength(100).And.IsAlpha();
 
I just reordered the clauses. Please solve issue or change the provided code.

comments