Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

Manually break an object rule on parent

$
0
0

Working on a project where there is missing Ref Int on the SQL database.  Business objects have to handle scenario of missing data by IDs.  (ugh I know).

During lazyload of child collection, if I detect there is some piece of data missing from the DB, I skip loading that child.

But I would like to provide feedback (Warning rule) on Parent that alerts user that the BusinessObjects have detected a referential integrity problem and what are the IDs associated with the problem.  This would give the customer some very helpful information to give to their DBA to go fix the issue.

How would I have the child collection tell the root/parent to break a warning rule with relevant info?

How would I write the rule on the root/parent so it only gets broken when the child collection says so.

Seems like broken rules is a good place to put this, maybe I am wrong?


Thanks

Sean


Viewing all articles
Browse latest Browse all 764

Trending Articles