Skip to content

Instantly share code, notes, and snippets.

@stefansedich
Created May 22, 2011 00:18
Show Gist options
  • Save stefansedich/985021 to your computer and use it in GitHub Desktop.
Save stefansedich/985021 to your computer and use it in GitHub Desktop.
CleanupTestDataEventListener
public class CleanupTestDataEventListener : IPostInsertEventListener
{
private readonly HashSet<object> _insertedEntities = new HashSet<object>();
public IEnumerable<object> InsertedEntities
{
get { return _insertedEntities.Reverse(); }
}
public void OnPostInsert(PostInsertEvent @event)
{
_insertedEntities.Add(@event.Entity);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment