private async Task WriteOperationParameterAsync(ODataParameterWriter parameterWriter, IEdmFunctionParameter operationParameter, string paramName, object paramValue)
 {
     if (operationParameter.Type.Definition.TypeKind == EdmTypeKind.Collection)
     {
         var collectionWriter = await parameterWriter.CreateCollectionWriterAsync(paramName);
         await collectionWriter.WriteStartAsync(new ODataCollectionStart());
         foreach (var item in paramValue as IEnumerable)
         {
             await collectionWriter.WriteItemAsync(item);
         }
         await collectionWriter.WriteEndAsync();
     }
     else
     {
         await parameterWriter.WriteValueAsync(paramName, paramValue);
     }
 }
 private void WriteOperationParameter(ODataParameterWriter parameterWriter, IEdmFunctionParameter operationParameter, string paramName, object paramValue)
 {
     if (operationParameter.Type.Definition.TypeKind == EdmTypeKind.Collection)
     {
         var collectionWriter = parameterWriter.CreateCollectionWriter(paramName);
         collectionWriter.WriteStart(new ODataCollectionStart());
         foreach (var item in paramValue as IEnumerable)
         {
             collectionWriter.WriteItem(item);
         }
         collectionWriter.WriteEnd();
     }
     else
     {
         parameterWriter.WriteValue(paramName, paramValue);
     }
 }