Intitialising Entities in a bound EntityCollection

Posts   
 
    
craigmain
User
Posts: 22
Joined: 17-Apr-2005
# Posted on: 21-Apr-2005 20:23:07   

Hi,

What is the recommended method of assigning default values to an entity when it is added to a an entity collection under the following circumstances. 1) When the entity is stand alone (I assume you just use the entity constructor). 2) When some of the values have external dependencies (I assume that trapping the list changed event is the only good way)

Is there any OnAdd delegate.

Regards Craig

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Apr-2005 10:09:46   

I'd write a method for that in the component which manages the functionality in which you want to use this. The variety of situations in which an entity can be added to a collection is pretty high. For example: myOrder.Customer = myCustomer; adds myOrder to myCustomer.Orders simple_smile

Frans Bouma | Lead developer LLBLGen Pro
craigmain
User
Posts: 22
Joined: 17-Apr-2005
# Posted on: 22-Apr-2005 15:42:04   

Otis,

Thanks for all your assistance. We are going to purchase your tool. Your level of support and assitance is quite exceptional.

Regards Craig

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Apr-2005 13:22:38   

craigmain wrote:

Otis,

Thanks for all your assistance. We are going to purchase your tool. Your level of support and assitance is quite exceptional.

Thanks! smile

Frans Bouma | Lead developer LLBLGen Pro