When a new ASP.NET Web API project is created, the WebApiConfig.cs class contains a single route:
config.Routes.MapHttpRoute(
 name: "DefaultApi",
 routeTemplate: "{controller}/{id}",
 defaults: new { id = RouteParameter.Optional }
);
In order to enable RPC style routes (like those used with non-Web API projects), add another route before the default:
config.Routes.MapHttpRoute(
 name: "RestPCApi",
 routeTemplate: "{controller}/{action}",
 defaults: new { action = RouteParameter.Optional }
);
All done, now the Web API project will route URLs just like the MVC 3/4 project. Here is what the finished file looks like:
using System.Web.Http;

namespace hansen.blog.api
{
 public static class WebApiConfig
 {
  public static void Register(HttpConfiguration config)
  {
   config.Routes.MapHttpRoute(
    name: "RestPCApi",
    routeTemplate: "{controller}/{action}",
    defaults: new { action = RouteParameter.Optional }
   );

   config.Routes.MapHttpRoute(
    name: "DefaultApi",
    routeTemplate: "{controller}/{id}",
    defaults: new { id = RouteParameter.Optional }
   );
  }
 }
}