title: No action was found on the controller that matches the request
body: <p>Sorry for the lame question. I've already read all similar questions and still can't resolve my issue.</p>
  
  <p>I'm getting 'No action was found on the controller that matches the request' error when calling from ajax:</p>
  
  <pre><code>$.ajax({
          url: '/api/ToyEdit/Post/',
          dataType: "json",
          type: "POST",
          contentType: 'application/json; charset=utf-8',
          data: JSON.stringify({toyId: 1, toy: 'asd'}),
      async: true,
      processData: false,
      cache: false,
      success: function (data) {
          alert(data);
      },
      error: function (xhr) {
          alert(xhr.statusText);
      }
  })
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public class ToyEditController : ApiController
  {
      [System.Web.Mvc.HttpGet]
      public EditToyViewModel Get(int? toyId)
      {
          var model = new EditToyViewModel();
  
          if (toyId.HasValue)
          {
              model.Toy = Data.GetToy(toyId.Value);
          }
  
          model.Companies = Data.GetCompanies().ToList();
  
          return model;
      }
  
      [System.Web.Mvc.HttpPost]
      [System.Web.Mvc.ActionName("Post")]
      public ActionResult Post(int? toyId, string toy)
      {
          var a = toy;
          /*new Task&lt;int&gt;(() =&gt; DB.Context.Toys.FirstAsync().Id);*/
  
          return new EmptyResult(); 
      }
  }
  </code></pre>
  
  <p>Routing:</p>
  
  <pre><code>        routes.MapRoute(
              name: "WebApi",
              url: "api/{controller}/{action}/{id}",
              defaults: new { id = UrlParameter.Optional }
          );
  
          routes.MapRoute(
              name: "Default",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
          );
  </code></pre>
  
  <p>What's wrong with code?</p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>OK, it works when i'm using the next code:</p>
  
  <pre><code>public class Toy
  {
    public int? toyId {get; set;}
    public string toy {get; set;}
  }
  
  [System.Web.Mvc.HttpPost]
  [System.Web.Mvc.ActionName("Post")]
  public ActionResult Post(Toy toy)
  {
      // your necessary codes
  }
  </code></pre>
  
  <p>But how to pass a few primitive vars?</p>