Generic Entity Collection

Posts   
 
    
joshmouch
User
Posts: 34
Joined: 02-Dec-2004
# Posted on: 20-Jun-2006 20:49:14   

This may already have been addressed (I have a May version of the Beta).

It would be nice if CollectionCore(Of T {IEntityCore}) had an interface that exposed (at least) its ListChanged event.

That way, it would be easier to pass around entity collection's to generic methods and handle their events.

If I understand correctly, .Net won't polymorph CollectionCore(Of SomeEntity) into CollectionCore(Of IEntityCore), so this is the only way I can think of to access the events, short of reflection.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 21-Jun-2006 12:15:24   

I'll add the ListChanged event to the IEntityCollection/IEntityCollection2 interfaces. An interface is indeed the only way to access properties of a generic type if you don't know the describing type (TEntity). THough it's recommended to use the new events added to IEntityCollection(2), like EntityAdded and EntityRemoved

Frans Bouma | Lead developer LLBLGen Pro