title: How to configure my action method which should have same route, same controller but only the verb changes in dotnetcore webapi
body: <p>I want to invoke the respective action method of the same controller given, route is same for both the action methods but only the http verb changes.</p>
  
  <pre><code>public class TestController: Controller
  {
      [HttpGet("{param1}/{param2}")]
      public string MethodWithGet(string param1, string param2)
      {
         return interalgetmethodcall(param1, param2);
      }
  
      [HttpPost("{param1}/{param2}")]
      public string MethodWithPost(string param1, string param2,[FromBody] dynamic datafrombody)
      {
         return interalpostmethodcall(param1, param2, datafrombody.toString());
      }
  }
  </code></pre>
  
  <p>When I try to do a get call, the return from the appropriate method is returned. But when I try to make a post call, this is giving 500 Internal server error.</p>
  
  <p>Is there a way I can use both method with same route, same controller but different httpverb to work?</p>