Looks like the entities Clone method is not persisting state. It's resetting state by calling AcceptChanges(). So that it's a clone of the data but not of state.
I'm not 100% positive on best practices for this one. I'll google around and maybe one of you that knows the answer could chime in as well.
In the meantime, you can just use something like FindAll, which does not call Clone on the entity.
TList<MyEntity> copiedList = list.FindAll(delegate(MyEntity entity)
{
return true;
});
|
- EDITED TO ADD: However it is still a reference to the entity in the original list, and not a copy of of the entity.
Robert Hinojosa
-------------------------------------
Member of the Codesmith Tools, .netTiers, teams
http://www.nettiers.com-------------------------------------