title: asp.net core 3 routing
body: <p>In my Asp.net core 3 project I am using some controler to access from js code to do some stuff and also using Razor pages at the same time.</p>
  
  <p>at the configure service section :</p>
  
  <pre><code>    services.AddControllersWithViews();
      services.AddRazorPages();
  </code></pre>
  
  <p>I added both RazorPages and MVC controller with view.</p>
  
  <p>And at then configure section</p>
  
  <pre><code>        app.UseRouting();
          app.UseEndpoints(endpoints =&gt;
          {              
              endpoints.MapRazorPages();
              endpoints.MapControllerRoute(
                  name: "default",
                  pattern: "{controller=Home}/{action=Index}/{id?}");
  
          });
  </code></pre>
  
  <p>Added above codes.
  When I try to access to controller I am getting 404. I also tried to add just <code>services.AddControllers();</code></p>
  
  <p>need help please.</p>
  
  <p>Edit : controller code</p>
  
  <pre><code>public class DashboardsController : BaseController, IDashboardsController
  {
      [HttpGet]
       public async Task&lt;JsonResult&gt; GetAssetCategorySummaryAsync(){
          -------
      }
  }
  </code></pre>