0

I have a parser(mamba operation) and I need to disable the Audit Trail functionality on start of parser, and enable it again when it ends.

How can I accomplish this? Any help would be appreciated.

grizzthedj
  • 7,131
  • 16
  • 42
  • 62
  • Please see [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and please include a [minimal, verifyable and complete example](https://stackoverflow.com/help/mcve). You need to show some code so that we can possibly help you. – Thomas Flinkow Mar 05 '18 at 13:34

2 Answers2

1

You can disabled it like this:

CommonLib.DataContext.ExecuteInUnitOfWork(obj => {
      //place your code here
});
nemo
  • 1,675
  • 10
  • 16
  • Thanks a lot, it needs a return obj to work like below. CommonLib.DataContext.ExecuteInUnitOfWork(obj => { //place your code here return obj ; }); – George Doslaris Mar 07 '18 at 07:41
0

I think that the method for disabling audit trail is the ExecuteWithoutAuditTrail. Write something like this:

CommonLib.DataContext.ExecuteWithoutAuditTrail(manager => {
    //write your code here
    return manager;
});
Billbarosa
  • 35
  • 3