/// <summary> /// Asks the service to asynchronously delete the echo uniquely identified through Id. /// </summary> /// <param name="id"> /// The echos unique identifier. /// </param> /// <returns> /// HTTP Status Code 204 - No Content if echo was successfully deleted, or did not exist, /// HTTP Status Code 500 - Internal Server Error if the other codes don't apply. Contains exception on DEBUG. /// </returns> public async Task <IHttpActionResult> Delete(int id) { var result = await _echoService.DeleteAsync(id); if (result.ActionStatus.Status == ActionStatusEnum.Success) { return(StatusCode(HttpStatusCode.NoContent)); } return(HandleErrorActionResult(result)); }