OData 4 web api 2 "No routing convention was found"
<p>I'm trying to post object to odata action, here my code</p>

<pre><code>public class DraftController : ODataController
{
    public HttpResponseMessage Attachment([FromODataUri] string key, [FromBody] DraftApi d)
    {
        try
        {
            return Request.CreateResponse(HttpStatusCode.Created, "(POST ATTACHMENT) key: " + key + " - id: " + d.id + ", desc: " + d.description);
        }
        catch (Exception e)
        {
            return Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message);
        }
    }
}
</code></pre>

<p>this is my model</p>

<pre><code>public class DraftApi
{
    [Key]
    public string id { get; set; }
    public string description { get; set; }
}
</code></pre>

<p>this is my OData route</p>

<pre><code>config.MapODataServiceRoute(
    routeName: "ODataDraft",
    routePrefix: "odata/{namespace}",
    model: BuildModel&lt;DraftApi&gt;("draft")
);
private static IEdmModel BuildModel&lt;T&gt;(string EntityName) where T : class
{
    ODataConventionModelBuilder ODataBuilder = new ODataConventionModelBuilder();
    ODataBuilder.EntitySet&lt;T&gt;(EntityName).EntityType.Name = EntityName;

    ActionConfiguration attachment = ODataBuilder.EntityType&lt;T&gt;().Action("Attachment");

    ODataBuilder.EnableLowerCamelCase();
    return ODataBuilder.GetEdmModel();
}
</code></pre>

<p>my call is this</p>

<pre><code>Url
http://127.0.0.1/mpssapi/odata/v1/draft('hhh')/Attachment
Headers
Content-Type: application/json
Payload
{id:"a", description: "abc"}
</code></pre>

<p>This is my response</p>

<pre><code>{
    "error": {
        "code": ""
        "message": "No HTTP resource was found that matches the request URI 'http://127.0.0.1/mpssapi/odata/v1/draft('hhh')/Attachment'."
        "innererror": {
        "message": "No routing convention was found to select an action for the OData path with template '~/entityset/key/unresolved'."
        "type": ""
        "stacktrace": ""
        }-
    }-
}
</code></pre>

<p>I have tried to add namespace to odata route but it doesn't work
any ideas?
thanks</p>