public async Task <IActionResult> PutRecenzija(int id, Recenzija recenzija) { if (id != recenzija.Id) { return(BadRequest()); } _context.Entry(recenzija).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RecenzijaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutAdministrator(int id, Administrator administrator) { if (id != administrator.Id) { return(BadRequest()); } _context.Entry(administrator).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AdministratorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }