public async Task <IActionResult> Delete(int id) { DeleteProductRequestResponse result = await _ProductRequestAppService.deleteProductRequest(id); if (result.Success) { return(Ok(result)); } return(NotFound(result)); }
public Task <DeleteProductRequestResponse> deleteProductRequest(int id) { DeleteProductRequestCommand command = new DeleteProductRequestCommand ( id ); Task <object> ProductRequest = (Task <object>)Bus.SendCommand(command); DeleteProductRequestResponse response = new DeleteProductRequestResponse(); response = Common <DeleteProductRequestResponse> .checkHasNotification(_notifications, response); return(Task.FromResult(response)); }