How to remove an entity from RemovedEntitiesTracker

Posts   
 
    
kem
User
Posts: 13
Joined: 13-Oct-2009
# Posted on: 20-Oct-2009 14:27:40   

I wantto remove an entity which is removed to RemovedEntitiesTracker of an EntityCollection.

I tried following code, howeer it throws exception: "[i]Object reference not set to an instance of an object.[/i]"


long pkValdel2 = Convert.ToInt64(entry.Value);

 List<int> x = MakbuzHizmetCollection.RemovedEntitiesTracker.FindMatches(MakbuzHizmetFields.HizmetId == pkValdel2);

 if (x.Count > 0)
 MakbuzHizmetCollection.RemovedEntitiesTracker.RemoveAt(x[0]);
                        

How can i handle that? Thanks...

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 20-Oct-2009 21:04:36   

Does x[0] actually contain a value ?

Matt