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()); }
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> PutClientRequest(int id, ClientRequest clientRequest) { if (id != clientRequest.Id) { return(BadRequest()); } _context.Entry(clientRequest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientRequestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEvaluation(int id, Evaluation evaluation) { if (id != evaluation.Id) { return(BadRequest()); } _context.Entry(evaluation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EvaluationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }