public async Task <IActionResult> PutPersona(int id, Persona.API.Model.Persona persona) { if (id != persona.IdDoc) { return(BadRequest()); } _context.Entry(persona).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTaskItem(int id, Persona item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
/// <summary> /// Modifica un espectacle a la base de dades /// </summary> /// <param name="espectacle">Espectacle</param> public void modificarEspectacle(Espectacle espectacle) { db.Entry(espectacle).State = EntityState.Modified; db.SaveChanges(); }