Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

IUrlHelper.Action should support use of the nameof() operator for controller names #5853

Description

@DevJohnC

Building URLs from within views, controllers or anywhere else should support the use of the nameof() operator for better compile time safety of generated URLs.

If you provide "HomeController" (ie. the result of nameof(HomeController)) to IUrlHelper or anything that uses it, such as the anchor tag helper, you will not get the URL you would expect. Instead MVC expects you to provide "Home".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions