public async Task <IHttpActionResult> PutSELF_DOWNLOADCODE(long id, SELF_DOWNLOADCODE sELF_DOWNLOADCODE) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != sELF_DOWNLOADCODE.ID) { return(BadRequest()); } db.Entry(sELF_DOWNLOADCODE).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SELF_DOWNLOADCODEExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> GetSELF_DOWNLOADCODEByOrderId(long id) { SELF_DOWNLOADCODE sELF_DOWNLOADCODE = await db.SELF_DOWNLOADCODE.FindAsync(id); if (sELF_DOWNLOADCODE == null) { return(NotFound()); } return(Ok(sELF_DOWNLOADCODE)); }