public override Task <DeletePostResponse> DeletePost(DeletePostRequest request, ServerCallContext context) { try { var post = new PostComment.Post(); var returnValue = post.DeletePost(request.Id); var response = new DeletePostResponse { Value = returnValue }; return(Task.FromResult(response)); } catch (Exception ex) { _logger.LogError(ex, "Error invoking DeletePost"); throw new RpcException(new Status(StatusCode.Internal, ex.Message)); } }