public void UpdatePackage(LoanProduct pPackage, bool updateContracts) { using (var connection = _productManager.GetConnection()) using (var transaction = connection.BeginTransaction()) { try { _productManager.UpdatePackage(pPackage, updateContracts, transaction); _productManager.DeleteEntryFees(pPackage, transaction); _productManager.InsertEntryFees(pPackage.EntryFees, pPackage.Id, transaction); LoanProductInterceptorUpdate(new Dictionary <string, object> { { "LoanProduct", pPackage }, { "SqlTransaction", transaction } }); transaction.Commit(); } catch (Exception) { transaction.Rollback(); throw; } } }
public void UpdatePackage(LoanProduct pPackage, bool updateContracts) { _productManager.UpdatePackage(pPackage, updateContracts); _productManager.DeleteEntryFees(pPackage); _productManager.InsertEntryFees(pPackage.EntryFees, pPackage.Id); }