app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "Areas",
pattern: "{area:exists}/{controller=Index}/{action=Index}/{id?}",
defaults: new { Area = "Admin", Controller = "Index", Action = "Index" }
);
});
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});