public async Task <IActionResult> PutMixAndCouponPayment(int id, MixAndCouponPayment mixAndCouponPayment) { if (id != mixAndCouponPayment.MixAndCouponPaymentId) { return(BadRequest()); } _context.Entry(mixAndCouponPayment).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MixAndCouponPaymentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <MixAndCouponPayment> > PostMixAndCouponPayment(MixAndCouponPayment mixAndCouponPayment) { _context.MixPayments.Add(mixAndCouponPayment); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMixAndCouponPayment", new { id = mixAndCouponPayment.MixAndCouponPaymentId }, mixAndCouponPayment)); }