public virtual void Persist(Action @base)
        {
            bool isCPMDeleting      = CustomerPaymentMethod.Cache.Deleted.Count() != 0;
            bool isDetailsInserting = CustomerPaymentMethodDetail.Cache.Inserted.Count() != 0;

            var graph = PXGraph.CreateInstance <CCCustomerInformationManagerGraph>();
            ICCPaymentProfileAdapter       paymentProfile       = new GenericCCPaymentProfileAdapter <CustomerPaymentMethod>(CustomerPaymentMethod);
            ICCPaymentProfileDetailAdapter paymentProfileDetail = new GenericCCPaymentProfileDetailAdapter <CustomerPaymentMethodDetail,
                                                                                                            PaymentMethodDetail>(CustomerPaymentMethodDetail, PaymentMethodDetail);

            if (!isCPMDeleting && isDetailsInserting && !string.IsNullOrEmpty(CustomerPaymentMethod.Current.CCProcessingCenterID) &&
                CCProcessingHelper.IsTokenizedPaymentMethod(this.Base, CustomerPaymentMethod.Current.PMInstanceID, true))
            {
                graph.GetOrCreatePaymentProfile(this.Base, paymentProfile, paymentProfileDetail);
            }
            //assuming only one record can be deleted from promary view of this graph at a time
            else if (isCPMDeleting && CCProcessingHelper.IsTokenizedPaymentMethod(this.Base, null, true))
            {
                graph.DeletePaymentProfile(this.Base, paymentProfile, paymentProfileDetail);
            }
            @base();
        }