public async Task <IActionResult> PutDogadjaj(int id, Dogadjaj dogadjaj) { if (id != dogadjaj.DogadjajId) { return(BadRequest()); } _context.Entry(dogadjaj).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DogadjajExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSjediste(int id, Sjediste sjediste) { if (id != sjediste.SjedisteId) { return(BadRequest()); } _context.Entry(sjediste).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SjedisteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPredstava(int id, Predstava predstava) { if (id != predstava.PredstavaId) { return(BadRequest()); } _context.Entry(predstava).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PredstavaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutRezervacija(int id, Rezervacija rezervacija) { if (id != rezervacija.RezervacijaId) { return(BadRequest()); } _context.Entry(rezervacija).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RezervacijaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }