public async Task <IHttpActionResult> PutReceipt(string id, Receipt receipt) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != receipt.TransNo) { return(BadRequest()); } try { await _SVC.UpdateReceipt(receipt); } catch (DbUpdateConcurrencyException) { if (!ReceiptExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
async public Task <ActionResult> Update(Receipt item) { return(Content(await _Service.UpdateReceipt(item))); }