'Is it possible to update or remove IEndpointRouteBuilder existing route entries

I'm trying to handle this error in asp.net core 5

AmbiguousMatchException: The request matched multiple endpoints. Matches

if possible, by removing previously register route (nopcommerce) but seems like there's no method or clean and easy work around available.

So, i'm wondering if there's any way to do something like
endpointRouteBuilder.AddOrUpdateControllerRoute or endpointRouteBuilder.RemoveRouteEntry and then register new one



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source