NewEntityAdded on Child caught in parent?

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 21-Jul-2009 13:35:49   

I have a tree that looks like: Role has Members

I need to ensure that each role has a unique list of members.

In order to take advantage of the EntityAdded helper, do I have to add a delegate to every Role.MemberCollection object? Or is there an easier way to know that Role 'X' has a new Member added to it's MemberCollection?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 21-Jul-2009 16:34:17   

Have a look at http://www.llblgen.com/documentation/2.6/Using%20the%20generated%20code/gencode_tapinroutinesevents.htm. You can catch the EntityCollection.EntityAdding event to allow you to check and reject what gets added to the collection.

Matt