In the old version of MVC 5 I could do this to pass route parameters
@Html.ActionLink("New item", "Suggestion", new ProductSuggestion() { Username = Model.Username }, new { @class = "btn btn-default" })
I am trying to get this to work with the new asp-action method and I figgured out I could do this as a workaround. But what is the correct syntax for this?
@{
var a = new Dictionary<string, string> { { "Username", Model.Username } };
}
<a asp-action="Suggestion" asp-all-route-data="a" class="btn btn-default">New item</a>