public async Task <IActionResult> PutClientEventWebhooks(int id, ClientEventWebhooks clientEventWebhooks) { if (id != clientEventWebhooks.ID) { return(BadRequest()); } _context.Entry(clientEventWebhooks).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientEventWebhooksExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <ClientEventWebhooks> > PostClientEventWebhooks(ClientEventWebhooks clientEventWebhooks) { _context.ClientEventWebhooks.Add(clientEventWebhooks); await _context.SaveChangesAsync(); return(CreatedAtAction("GetClientEventWebhooks", new { id = clientEventWebhooks.ID }, clientEventWebhooks)); }