title: How to call an OData function/action generated by a OData client generator?
body: <p>Linked to my <a href="https://stackoverflow.com/questions/27962303/how-to-make-odata-v4-function-strings-unicode">other question</a>, if I have an OData function with the following definitions</p>
  
  <pre><code>builder.EntitySet&lt;Ent&gt;("Ent");
  var companyActionConfig = builder.EntityType&lt;Ent&gt;().Action("MethodX");
  entActionConfig.Parameter&lt;int&gt;("SomeParam1");
  entActionConfig.Parameter&lt;string&gt;("SomeParam2");
  entActionConfig.Returns&lt;bool&gt;();
  </code></pre>
  
  <p>which results into the following service definition (with regard to this action)</p>
  
  <pre><code>&lt;Action Name="MethodX" IsBound="true"&gt;
      &lt;Parameter Name="bindingParameter" Type="Ent"/&gt;
      &lt;Parameter Name="SomeParam1" Type="Edm.Int32" Nullable="false"/&gt;
      &lt;Parameter Name="SomeParam2" Type="Edm.String" Unicode="false"/&gt;
      &lt;ReturnType Type="Edm.Boolean" Nullable="false"/&gt;
  &lt;/Action&gt;
  </code></pre>
  
  <p>Then how I could call the function from the OData v4 T4 generated code?</p>
  
  <p>I see there's a class named <code>ExtensionsMethods</code> with the following function int it</p>
  
  <pre><code>public static class ExtensionMethods
  {
      public static global::Microsoft.OData.Client.DataServiceActionQuerySingle&lt;bool&gt; MethodX(this global::Microsoft.OData.Client.DataServiceQuerySingle&lt;global::Ent&gt; source, int SomeParam1, string SomeParam2)
      {
          if (!source.IsComposable)
          {
              throw new global::System.NotSupportedException("The previous function is not composable.");
  
          }
  
          return new global::Microsoft.OData.Client.DataServiceActionQuerySingle&lt;bool&gt;(source.Context, source.AppendRequestUri("MethodX"), new global::Microsoft.OData.Client.BodyOperationParameter("SomeParam1", SomeParam1),
                  new global::Microsoft.OData.Client.BodyOperationParameter("SomeParam2", SomeParam2));
      }
  </code></pre>
  
  <p>}</p>
  
  <p>But I don't have an idea how to make the call in the code. That is, if I'd like to write something like</p>
  
  <pre><code>//How to call MethodX here?
  //var entContainer = new Container("http://someurl").Ents...
  </code></pre>
  
  <p>it doesn't seem to be possible easily. How could I call the function?</p>