title: Http get and post method without attribute name
body: <p>I'm using .net Core 2.1 Web API. I add every method <code>[HttpGet("....")]</code> or <code>[HttpPost("....")]</code> like below. But, I don't want to write every method in every controller. I want to write only <code>[HttpGet]</code> or <code>[HttpPost]</code>. How can I achieve this? </p>
  
  <p>Or, if this is not possible, can I do this like <code>[HttpPost("[action]")]</code> with taking automatically actionName?</p>
  
  <p>I'm calling like this:
  <a href="http://localhost:5000/api/University/GetUniversities" rel="nofollow noreferrer">http://localhost:5000/api/University/GetUniversities</a></p>
  
  <p>This working perfectly</p>
  
  <pre><code>namespace University.API.Controllers
  {
      [Route("api/[controller]")]
      [ApiController]
      public class UniversityController : ControllerBase
      {
          private readonly IUniversityService universityService;
  
          public UniversityController(IUniversityService universityService)
          {
              this.universityService = universityService;
          }
  
          [HttpGet("GetUniversities")]
          public async Task&lt;ServiceResult&gt; GetUniversities()
          {
              return await universityService.GetUniversities();
          }
  
          [HttpGet("GetUniversityStatues")]
          public async Task&lt;ServiceResult&gt; GetUniversityStatues()
          {
              return await universityService.GetUniversityStatues();
          }
      }
  }
  </code></pre>
  
  <p>I tried this but is not working:</p>
  
  <pre><code>namespace University.API.Controllers
  {
      [Route("api/[controller]")]
      [ApiController]
      public class UniversityController : ControllerBase
      {
          private readonly IUniversityService universityService;
  
          public UniversityController(IUniversityService universityService)
          {
              this.universityService = universityService;
          }
  
          [HttpGet]
          public async Task&lt;ServiceResult&gt; GetUniversities()
          {
              return await universityService.GetUniversities();
          }
  
          [HttpGet]
          public async Task&lt;ServiceResult&gt; GetUniversityStatues()
          {
              return await universityService.GetUniversityStatues();
          }
      }
  }
  </code></pre>