public PaymentToCompany Create(CreatePaymentToCompanyCommand command) { var payment = new PaymentToCompany(command.IdCompany, command.Value, command.DatePayment, command.Description); payment.Create(); _repository.Create(payment); if (Commit()) { return(payment); } return(null); }
public void Delete(PaymentToCompany payment) { _context.PaymentToCompany.Remove(payment); }
public void Update(PaymentToCompany payment) { _context .Entry <PaymentToCompany>(payment).State = EntityState.Modified; }
public void Create(PaymentToCompany payment) { _context.PaymentToCompany.Add(payment); }