public IHttpActionResult PutSymp_Des(int id, Symp_Des symp_Des) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != symp_Des.Symp_Des_ID) { return(BadRequest()); } db.Entry(symp_Des).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!Symp_DesExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetSymp_Des(int id) { Symp_Des symp_Des = db.Symp_Des.Find(id); if (symp_Des == null) { return(NotFound()); } return(Ok(symp_Des)); }
public IHttpActionResult PostSymp_Des(Symp_Des symp_Des) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Symp_Des.Add(symp_Des); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = symp_Des.Symp_Des_ID }, symp_Des)); }
public IHttpActionResult GetSymp_Des(int id) { db.Configuration.ProxyCreationEnabled = false; Symp_Des symp_Des = db.Symp_Des.Find(id); if (symp_Des == null) { return(NotFound()); } return(Ok(symp_Des)); }
public IHttpActionResult DeleteSymp_Des(int id) { Symp_Des symp_Des = db.Symp_Des.Find(id); if (symp_Des == null) { return(NotFound()); } db.Symp_Des.Remove(symp_Des); db.SaveChanges(); return(Ok(symp_Des)); }
public IHttpActionResult DeleteSymp_Des(int id) { db.Configuration.ProxyCreationEnabled = false; Symp_Des symp_Des = db.Symp_Des.Find(id); if (symp_Des == null) { return(NotFound()); } db.Symp_Des.Remove(symp_Des); db.SaveChanges(); return(Ok(symp_Des)); }