I know that we should use this below code to define a new route in nop 4.30:
endpointRouteBuilder.MapControllerRoute("RouteName", "Plugins/Nop/Configure",
new { controller = "NopProduct", action = "Configure", area = AreaNames.Admin });
But I want to change default routes of nopcommerce...
Actually I want to change Login route to use my plugin controller and action
Before nopcommerce 4.30 I could change default routes in RouteProvider.cs like this :
I had to remove the default route this way :
var lastLoginRoute = routeBuilder.Routes.FirstOrDefault(x => ((Route)x).Name == "Login");
routeBuilder.Routes.Remove(lastLoginRoute);
And I had to define the route to my plugin this way :
routeBuilder.MapRoute("Login", "login/", new { controller = "MyPluginController", action = "MyLogin", });
But now in nop 4.30 which uses AspCore 3.1 and endpointRouteBuilder I do not know how I should change default routes to my plugin.
In fact I cannot remove default route which is defined in Nop.Web.Infrastructure.RouteProvider from the datasource of endpointRouteBuilder
Please someone help me.