This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Routes values are being added in duplicate #3250
Comments
This seems like a bug. Can you include a callstack for the exception? As a workaround, if you're just trying to link to the 'current values' you don't need to pass them in to
|
Here is the stack. Does it help?
|
Thanks, that will help us narrow it down. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I created a TagHelper and needed to access the current route so I ended up with:
When I create the route I get the error "ArgumentException: An item with the same key has already been added." on every route which is defined using Attribute Routing.
To fix this I needed to apply Distinct to values before creating a route.
Is there any reason for having duplicated objects in route values? Is this a bug?
If this is the expected result is there a better way to get the current route values?
Note: I get the same error using ViewContext ...
Thank You,
Miguel
The text was updated successfully, but these errors were encountered: