public async Task <IActionResult> RemoveTransformer(int transformerid) { var transformerObject = await GetTransformer(transformerid); var transformer = GetTransformerObjectFromActionResult(transformerObject); if (transformer != null) { var result = await _datastore.RemoveTransformerAsync(transformerid); if (result) { return(StatusCode((int)HttpStatusCode.NoContent)); } } return(BadRequest(Responses.INVALID_TRANSFORMER_ID)); }