Skip to content
Discussion options

You must be logged in to vote

The issue here is that AddOutValue will make the object dirty if the value is changed from OuputProperty and so could trigger further rules on the changed property.

I would suggest these changes:

    protected override void AddBusinessRules()
    {
        base.AddBusinessRules();
        BusinessRules.AddRule(new FullNameRule(FullNameProperty));
    }

    private class FullNameRule : Csla.Rules.BusinessRule
    {
        public FullNameRule(IPropertyInfo primaryProperty) : base(primaryProperty)
        {
              // inputproperties is an implicit dependency - no need for explicit dependency rules 
              InputProperties.Add(FirstNameProperty);
              InputProperties.A…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bashinamwila
Comment options

@bashinamwila
Comment options

@rockfordlhotka
Comment options

Answer selected by theafricaninternetgroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants