Skip to content
Discussion options

You must be logged in to vote

It depends on what you need to show the user.

A simple foreach loop through the child objects allows you to call GetBrokenRules on each and build a list of all the broken rules.

I see a challenge here, in that the BrokenRule type doesn't keep track of the object it pertains to, so you can't tell the user which object corresponds to each broken rule without doing that work yourself. You could solve that in a number of ways if that information is relevant.

For example, define a MyBrokenRule class:

  public class MyBrokenRule
  {
    public MyBrokenRule(MyChild child, Csla.Rules.BrokenRule rule)
    {
      ContainingObject  = child;
      BrokenRule = rule;
    }

    public MyChild Contain…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Chicagoan2016
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants