title: Multiple get methods in .net core 3.1 web api
body: <p>I am trying to create a very basic controller with three get methods
  Below are the three uri's for them</p>
  <ol>
  <li>GET /movies - gets all movies.</li>
  <li>GET /movies?name={name}` - finds all movies matching the specified name</li>
  <li>Get /Movies/{Id} - Find movie By Id</li>
  </ol>
  <p>My code for the controller is as below</p>
  <pre><code>[Route(&quot;api/[controller]&quot;)]
  [ApiController]
  public class MoviesController : ControllerBase
  {
      private readonly IMoviesService moviesService;
  
      public MoviesController(IMoviesService moviesService)
      {
          this.moviesService = moviesService;
      }
      
      [HttpGet]
      public async Task&lt;IActionResult&gt; Get()
      {
          var result = await moviesService.GetMoviesAsync();
          return Ok(result);
      }
      
      [HttpGet]
      public async Task&lt;IActionResult&gt; GetByName([FromQuery(Name = &quot;name&quot;)] string name)
      {
          var result = await moviesService.GetMoviesByNameAsync(name);
          return Ok(result);
      }
  
      [HttpGet(&quot;{Id}&quot;, Name = &quot;GetById&quot;)]
      public async Task&lt;IActionResult&gt; GetById(Guid Id)
      {
          var result = await moviesService.GetMovieById(Id);
          return Ok(result);
      }       
  
  }
  </code></pre>
  <p>When i send the request to GetById by <code>api/movies/31234567-89ab-cdef-0123-456789abcdef</code> then it works
  but for <code>api/movies</code> and <code>api/movies?name=Test</code> i get below error</p>
  <p><code>The request matched multiple endpoints. Matches: MoviesController.Get and MoviessController.GetByName</code></p>
  <p>Can anyone please suggest me what is the best way to implement such scenario in web api .net core 3.1 considering best practises?</p>