public void PublishAll(IEnumerable <P.Payment> payments) { foreach (var payment in payments) { payment.Publish(); PaymentRepository.Edit(payment); } }
protected virtual void OnImport(IEnumerable <P.Payment> payments, P.Payments dbPayments) { foreach (var payment in payments) { if (dbPayments.FirstOrDefault(dbPayment => dbPayment.PaymentID == payment.PaymentID) != null) { PaymentRepository.Edit(payment); } else { PaymentRepository.Add(payment); } } }
public void Edit(P.Payment payment) { PaymentRepository.Edit(payment); }
public void Publish(P.Payment payment) { payment.Publish(); PaymentRepository.Edit(payment); }