public int LedgerSave(Ledger ledger) { if (ledger == null) { throw new ArgumentNullException(nameof(ledger)); } return(ExecuteFaultHandledOperation(() => { ILedgerRepository ledger_repo = _data_repository_factory.GetDataRepository <ILedgerRepository>(); int ledger_key; LedgerData prod_data = MapLedgerToLedgerData(ledger); ledger_key = ledger_repo.Insert(prod_data); return ledger_key; })); }