public async Task <IActionResult> PutVirus(long id, Virus virus) { if (id != virus.VirusID) { return(BadRequest()); } _context.Entry(virus).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VirusExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutRecomendacoe(long id, Recomendacoe recomendacoe) { if (id != recomendacoe.RecomendacoeId) { return(BadRequest()); } _context.Entry(recomendacoe).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RecomendacoeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutZona(long id, Zona zona) { if (id != zona.Id) { return(BadRequest()); } _context.Entry(zona).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZonaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }