title: Endpoint Routing .net core 3-Multiple Areas
body: <p>I am trying to migrate from .net core 2.2 routing to endpoint routing in asp.net core 3 with following route in startup</p>
  
  <p>My .net core 2.2 route were</p>
  
  <pre><code>routes.MapRoute(
                      name: "default",
                      template: "{controller=Home}/{action=Index}/{id?}");
  
                  routes.MapRoute(
                      name: "AppArea",
                      template: "{area:exists}/{controller=Home}/{did?}/{action=Index}/{id?}");
  </code></pre>
  
  <p>.net core 3 route  </p>
  
  <pre><code>  app.UseEndpoints(routes =&gt;
                  {                    
                      routes.MapControllerRoute(
                           name:"default",
                           pattern:"{controller=Home}/{action=Index}/{id?}");
  
                      routes.MapAreaControllerRoute(
                          name: "areas",
                          areaName:  "myarea",
                              pattern: "{area:exists}/{controller=Home}/{did?}/{action=Index}/{id?}");                
                      routes.MapRazorPages();
                     });
  </code></pre>
  
  <p>My issue is in .net core 2.2 above configuration map multiple areas such as <code>area1</code> <code>area2</code> etc. but in .net core it only works if i give hard code area name not the dynamic areaname</p>