title: How to use two methods in the Restful WebApi with HttpPost attribute
body: <pre><code>public class IncidentController : ApiController
      {
          [HttpPost]
          [ActionName("Incident")]
          public async Task&lt;IEnumerable&lt;IncidentModel&gt;&gt; GetAsync([FromBody] IncidentQuery incidentQuery)
          {
          }
  
          [HttpPost]
          [ActionName("ProblemRecord")]
          public async Task&lt;IEnumerable&lt;ProblemRecordModel&gt;&gt; GetAsync([FromBody] ProblemRecordQuery problemRecordQuery, ILog log)
          {
          }   
      }
  </code></pre>
  
  <p>I have multiple HttpPost methods to from the same controller and i defined the ActionName attribute and also added the routes.</p>
  
  <pre><code>config.Routes.MapHttpRoute(
  name: "Incident",
  routeTemplate: "api/incident",
  defaults: new { controller = "Incident" });
  
  config.Routes.MapHttpRoute(
  name: "ProblemRecord",
  routeTemplate: "api/incident",
  defaults: new { controller = "Incident" });
  </code></pre>
  
  <p>Still the Context class throws the exception. Can someone explain me how to get over this issue. I have two methods with same MethodName and HttpPost attribute.</p>
  
  <p>New to Restful webservice. Please help</p>