public IHttpActionResult PutGetCards_Result(int id, GetCards_Result getCards_Result) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != getCards_Result.bankId) { return(BadRequest()); } db.Entry(getCards_Result).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!GetCards_ResultExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetGetCards_Result(int id) { GetCards_Result getCards_Result = db.GetCards_Result.Find(id); if (getCards_Result == null) { return(NotFound()); } return(Ok(getCards_Result)); }
public IHttpActionResult PostGetCards_Result(GetCards_Result getCards_Result) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.GetCards_Result.Add(getCards_Result); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = getCards_Result.bankId }, getCards_Result)); }
public IHttpActionResult DeleteGetCards_Result(int id) { GetCards_Result getCards_Result = db.GetCards_Result.Find(id); if (getCards_Result == null) { return(NotFound()); } db.GetCards_Result.Remove(getCards_Result); db.SaveChanges(); return(Ok(getCards_Result)); }