public async Task <IActionResult> PutReclamation(Guid id, Reclamation reclamation) { if (id != reclamation.Id) { return(BadRequest()); } _context.Entry(reclamation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReclamationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEntreprise(Guid id, Entreprise entreprise) { if (id != entreprise.Id) { return(BadRequest()); } _context.Entry(entreprise).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EntrepriseExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }