public async Task <IActionResult> PutRapport_Geo(int id, Rapport_Geo rapport_Geo) { if (id != rapport_Geo.Id) { return(BadRequest()); } _context.Entry(rapport_Geo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Rapport_GeoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFestival_Artiste(int id, Festival_Artiste festival_Artiste) { if (id != festival_Artiste.Id) { return(BadRequest()); } _context.Entry(festival_Artiste).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Festival_ArtisteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPays(int id, Pays pays) { if (id != pays.Id) { return(BadRequest()); } _context.Entry(pays).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PaysExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutHebergement(int id, Hebergement hebergement) { if (id != hebergement.IdH) { return(BadRequest()); } _context.Entry(hebergement).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HebergementExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutLieu(int id, Lieu lieu) { if (id != lieu.IdL) { return(BadRequest()); } _context.Entry(lieu).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LieuExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IHttpActionResult> PutFestival(int id, Festival festival) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != festival.Id) { return(BadRequest()); } db.Entry(festival).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FestivalExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IActionResult> PutTarif(int id, Tarif tarif) { if (id != tarif.IdT) { return(BadRequest()); } _context.Entry(tarif).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TarifExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutOrganisateur(int id, Organisateur organisateur) { if (id != organisateur.IdO) { return(BadRequest()); } _context.Entry(organisateur).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrganisateurExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task<IActionResult> PutJour(int id, Jour jour) { if (id != jour.IdJ) { return BadRequest(); } _context.Entry(jour).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JourExists(id)) { return NotFound(); } else { throw; } } return NoContent(); }
public async Task <IActionResult> PutScene(int id, Scene scene) { if (id != scene.IdS) { return(BadRequest()); } _context.Entry(scene).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SceneExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGimi(int id, Gimi gimi) { if (id != gimi.IdG) { return(BadRequest()); } _context.Entry(gimi).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GimiExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }