dotnet / dotnet/aspnetcore

Tuples are not supported by Url.RouteUrl()

Open
#57,556 0 comments 0 reactions 0 assignees View on GitHub
area-mvc untriaged
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

Not sure if this is expected or not, but the `Url.RouteUrl` call in ASP.NET Core Razor view doesn't support `Tuple`s.

VS Code: `v1.92.2`
O# extension: `v2.39.29`

```cs
@using Filter = (int? A, int? B, int? C);

@(Url.RouteUrl(new Filter { A = 1, B = 2, C = null }))


```

It renders the current URL without any parameters specified.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.