diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 09fc389..d309c8a 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -210,7 +210,7 @@ namespace <#= Configuration.Namespace#>.Clients /// protected string EncodeParam(T value) { - return System.Net.WebUtility.UrlEncode(value.ToString()); + return System.Net.WebUtility.UrlEncode(value?.ToString()); } ///