public async Task <IActionResult> PutEtablissement(Guid id, Etablissement etablissement) { if (id != etablissement.Id) { return(BadRequest()); } _context.Entry(etablissement).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EtablissementExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutHoraire(Guid id, Horaire horaire) { if (id != horaire.Id) { return(BadRequest()); } _context.Entry(horaire).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HoraireExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }