public IHttpActionResult PutResponsable(Responsable responsable) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Entry(responsable).State = EntityState.Modified; try { db.SaveChanges(); return(Ok(true)); } catch (DbUpdateConcurrencyException) { if (!ResponsableExists(responsable.IdResponsable)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutActividad(Actividad actividad) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Entry(actividad).State = EntityState.Modified; try { db.SaveChanges(); return(Ok(true)); } catch (DbUpdateConcurrencyException) { if (!ActividadExists(actividad.IdActividad)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutEstado(Estado estado) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Entry(estado).State = EntityState.Modified; try { db.SaveChanges(); return(Ok(true)); } catch (DbUpdateConcurrencyException) { if (!EstadoExists(estado.IdEstado)) { return(NotFound()); } else { throw; } } }