Can't get ODATA v4 actions attached to an entity to work
<p>So, I tried following the instructions <a href="http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/odata-actions-and-functions" rel="nofollow">here</a> to implement an action on my Job entity, but for the life of me, I can't get OData to recognize it.</p>

<p>The Action is pretty simple.  Just a toggle for a boolean:</p>

<pre><code>[HttpPost]
public IHttpActionResult Pause([FromODataUri]int key)
{
    if (!ModelState.IsValid)
    {
         return BadRequest();
    }

    Job job = _context.Job.Find(key);
    if (job == null)
    {
        return NotFound();
    }

    job.IsPaused = !job.IsPaused;
    _context.SaveChanges();

    return Ok(acquisition.IsPaused);
}
</code></pre>

<p>And it is defined in my WebApiConfig as:</p>

<pre><code>var jobEntity = builder.EntityType&lt;Job&gt;();
var pause = jobEntity.Action("Pause");
pause.Returns&lt;bool&gt;();
</code></pre>

<p>So, I should be able to POST to //url/odata/Job(key)/Pause to call it.  Unfortunately, it doesn't recognize the Pause action, listing it with a response of entityset/key/unresolved action.  If I try to use the ODataRoute attribute on it:</p>

<pre><code>[ODataRoute("Job({key})/Pause")]
</code></pre>

<p>It chokes on the Pause, giving me a compile error of "The path template 'Job({key})/Pause' on the action Pause in controller 'Job' is not a valid OData path template.  Found an unresolved path segment 'Pause' in the OData path template."</p>

<p>Now, if I make it an unbound action:</p>

<pre><code>var pause = builder.Action("Pause");
pause = Parameter&lt;int&gt;("key");
pause.Returns&lt;bool&gt;();
</code></pre>

<p>and </p>

<pre><code>[HttpPost]
[ODataRoute("Pause")]
public IHttpActionResult Pause(ODataActionParameters parameters)
{
    if (!ModelState.IsValid)
    {
         return BadRequest();
    }

    var key = Convert.ToInt32(parameters["key"]);
    Job job = _context.Job.Find(key);
    if (job == null)
    {
        return NotFound();
    }

    job.IsPaused = !job.IsPaused;
    _context.SaveChanges();

    return Ok(acquisition.IsPaused);
}
</code></pre>

<p>It works just fine.  So, why can't I bind this to the Job entity?  Just as a note I did try adding ODataActionParameters, even tho I don't have any parameters to see if that changed anything.  It didn't.</p>