Erase an entity in C#

Top  Previous  Next

Once you have the entity...

 

   Entity entity = (Entity)tr.GetObject(id, OpenMode.ForRead);

 

...simply call Erase on it...

 

   entity.Erase();

 

 

...to delete or remove it.