public IHttpActionResult PutOther_Information(int id, Other_Information other_Information) { if (id != other_Information.Information_ID) { return(BadRequest()); } db.Entry(other_Information).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!Other_InformationExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PostOther_Information(Other_Information other_Information) { db.Other_Information.Add(other_Information); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = other_Information.Information_ID }, other_Information)); }
public IHttpActionResult GetOther_Information(int id) { Other_Information other_Information = db.Other_Information.Find(id); if (other_Information == null) { return(NotFound()); } return(Ok(other_Information)); }
public IHttpActionResult DeleteOther_Information(int id) { Other_Information other_Information = db.Other_Information.Find(id); if (other_Information == null) { return(NotFound()); } db.Other_Information.Remove(other_Information); db.SaveChanges(); return(Ok(other_Information)); }