moved some auditing code to a reusable method to workaround a bug for now (savechanges is not being called on insert)