public static void AddChangingEndpointPrefixType(EndPointRow pEndpointRow, CustomerAcctDto pCustomerAcct) { using (var _db = new Rbr_Db()) { using (var _tx = new Transaction(_db, pEndpointRow, pCustomerAcct)) { EndpointManager.UpdatePrefixType(_db, pEndpointRow, pCustomerAcct.PrefixInTypeId); var _endpointContext = new EndpointContext { CustomerAcct = pCustomerAcct }; if (_endpointContext.CustomerAcct != null) { var _newDialPeer = new DialPeerRow { End_point_id = pEndpointRow.End_point_id, Prefix_in = _endpointContext.CustomerAcct.PrefixIn, Customer_acct_id = _endpointContext.CustomerAcct.CustomerAcctId }; CustomerAcctManager.AddDialPeer(_db, _newDialPeer, pEndpointRow); } _tx.Commit(); } } }