public IHttpActionResult PutCYCParameterMST(long id, CYCParameterMST cYCParameterMST) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != cYCParameterMST.CYCParameterMSTId) { return(BadRequest()); } db.Entry(cYCParameterMST).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!CYCParameterMSTExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetCYCParameterMST(long id) { CYCParameterMST cYCParameterMST = db.CYCParameterMSTs.Find(id); if (cYCParameterMST == null) { return(NotFound()); } return(Ok(cYCParameterMST)); }
public IHttpActionResult PostCYCParameterMST(CYCParameterMST cYCParameterMST) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.CYCParameterMSTs.Add(cYCParameterMST); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = cYCParameterMST.CYCParameterMSTId }, cYCParameterMST)); }
public IHttpActionResult DeleteCYCParameterMST(long id) { CYCParameterMST cYCParameterMST = db.CYCParameterMSTs.Find(id); if (cYCParameterMST == null) { return(NotFound()); } db.CYCParameterMSTs.Remove(cYCParameterMST); db.SaveChanges(); return(Ok(cYCParameterMST)); }