public IHttpActionResult PutEQUIPOS_INSTALADOS(int id, EQUIPOS_INSTALADOS eQUIPOS_INSTALADOS) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != eQUIPOS_INSTALADOS.EQUIPO_INSTALADO_ID) { return(BadRequest()); } db.Entry(eQUIPOS_INSTALADOS).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!EQUIPOS_INSTALADOSExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetEQUIPOS_INSTALADOS(int id) { EQUIPOS_INSTALADOS eQUIPOS_INSTALADOS = db.EQUIPOS_INSTALADOS.Find(id); if (eQUIPOS_INSTALADOS == null) { return(NotFound()); } return(Ok(eQUIPOS_INSTALADOS)); }
public IHttpActionResult PostEQUIPOS_INSTALADOS(EQUIPOS_INSTALADOS eQUIPOS_INSTALADOS) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.EQUIPOS_INSTALADOS.Add(eQUIPOS_INSTALADOS); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = eQUIPOS_INSTALADOS.EQUIPO_INSTALADO_ID }, eQUIPOS_INSTALADOS)); }
public IHttpActionResult DeleteEQUIPOS_INSTALADOS(int id) { EQUIPOS_INSTALADOS eQUIPOS_INSTALADOS = db.EQUIPOS_INSTALADOS.Find(id); if (eQUIPOS_INSTALADOS == null) { return(NotFound()); } db.EQUIPOS_INSTALADOS.Remove(eQUIPOS_INSTALADOS); db.SaveChanges(); return(Ok(eQUIPOS_INSTALADOS)); }