public async Task <IActionResult> PutCertRequest(int id, CertRequest certRequest) { if (id != certRequest.Id) { return(BadRequest()); } _context.Entry(certRequest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CertRequestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDomain(string id, Domain domain) { if (id != domain.DomainName) { return(BadRequest()); } _context.Entry(domain).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DomainExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProposal(int id, Proposal proposal) { if (id != proposal.Id) { return(BadRequest()); } _context.Entry(proposal).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProposalExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPersonne(string id, Personne personne) { if (id != personne.Email) { return(BadRequest()); } _context.Entry(personne).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonneExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }