AvocadoSoftware.com

Software For Hardcore Developers
Welcome to AvocadoSoftware.com Sign in | Join | Help
in Search

Derick Baileys old blog archives - go to derickbailey.com for new contents

Let's try this again...

apparently my current blog software strips out the embedded tags... so let's try not embedding them.

      private PropertyRulesValidationService<TeamMember> GetValidationRules()
        {
            PropertyRulesValidationService<TeamMember> validationService = new PropertyRulesValidationService<TeamMember>();

            RuleValidationDelegate<TeamMember> validateFirstName = new RuleValidationDelegate<TeamMember>
                (teamMember => { return !string.IsNullOrEmpty(teamMember.FirstName); });

            validationService.AddRule("Require First Name", "First Name is required for a Team Member.", validateFirstName, "FirstName");

            RuleValidationDelegate<TeamMember> validateLastName = new RuleValidationDelegate<TeamMember>
                (teamMember => { return !string.IsNullOrEmpty(teamMember.LastName); });

            validationService.AddRule("Require Last Name", "Last Name is required for a Team Member.", validateLastName, "LastName");

            return ValidationService;
        }
d'oh... it formats it... without color. 
Published Friday, February 01, 2008 7:41 AM by dredge
New Comments to this post are disabled

This Blog

Post Calendar

<February 2008>
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
2425262728291
2345678

Advertisement

News

this is my old blog archives - go to http://derickbailey.com for updates

Syndication

Advertisement

Powered by Community Server, by Telligent Systems