Dumb question about entity collections

Posts   
 
    
stoneyowl avatar
stoneyowl
User
Posts: 62
Joined: 29-Jan-2004
# Posted on: 11-Jan-2005 21:54:43   

Very probably a dumb question, but....

Maybe I missed it somewhere, but how do I retrieve an entity object from an entity collection, with the PK value? I really do not want to make another round trip to teh DB when I already have the collection of entities avaliable...

Maybe this should be added to the 'How Do I...' section.... simple_smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 11-Jan-2005 22:10:53   

create a new dummy entity, set the PK field(s) to the value you want to retrieve, set IsNew to false and use collection.IndexOf(dummy) simple_smile

Frans Bouma | Lead developer LLBLGen Pro