title: 'Route' is an ambiguous reference between 'Microsoft.AspNetCore.Components.RouteAttribute' and 'Microsoft.AspNetCore.Mvc.RouteAttribute'
body: <p>I am using Attribute routing. I need both the assemblies reference. I've tried, but not worked for me. Does anyone know how to fix this? Here is my Controller code:
  Namespaces</p>
  <pre><code>using Microsoft.AspNetCore.Components;
  using Microsoft.AspNetCore.Mvc;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Task1CRUD.Repository;
  using Task1CRUD.Model;
  
  namespace Task1CRUD.Controllers
  {
  
      [Route(&quot;api/[Controller]&quot;)]
      [ApiController]
      public class CustomerController:Controller
      {
              private readonly ICustomerRepository _customerRep;
              public CustomerController(ICustomerRepository customerRepository)
              {
                  _customerRep = customerRepository;
              }
  
              // GET api/values
              [HttpGet(&quot;&quot;)]
              public async Task&lt;List&lt;Customer&gt;&gt; GetCustomers()
              {
                  return await _customerRep.GetCustomers();
              }
  
      }
  }
  </code></pre>