public async Task <IActionResult> Putpayment(long id, payment payment) { if (id != payment.UserID) { return(BadRequest()); } _context.Entry(payment).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!paymentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }