public async Task <IActionResult> PutNaselje(int id, Naselje naselje) { if (id != naselje.Id) { return(BadRequest()); } _context.Entry(naselje).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NaseljeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDrzava(int id, Drzava drzava) { if (id != drzava.Id) { return(BadRequest()); } _context.Entry(drzava).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DrzavaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }