public async Task <IActionResult> PutPaymentMethodEasyPay(Guid id, PaymentMethodEasyPay paymentMethodEasyPay) { if (id != paymentMethodEasyPay.Id) { return(BadRequest()); } _context.Entry(paymentMethodEasyPay).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PaymentMethodEasyPayExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PaymentMethodEasyPay> > PostPaymentMethodEasyPay(PaymentMethodEasyPay paymentMethodEasyPay) { _context.PaymentMethodEasyPays.Add(paymentMethodEasyPay); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPaymentMethodEasyPay", new { id = paymentMethodEasyPay.Id }, paymentMethodEasyPay)); }