While experimenting with ASP.NET Core and Razor views it occurred to me that the magic-string-based links really weren’t ideal, so I did a little googling and came across the excellent AspNet.Mvc.TypedRouting nuget package, which lets you use strongly-typed references to controllers and action methods.
I won’t repeat the install instructions, but for some reason they didn’t provide any examples of using their extension methods with the one thing I wanted to do - action links. For future reference, here’s an example of how to use them in a Razor view<li>@( Html.ActionLink<AppController>(“Home”, c => c.Index()) )</li>
<li>@( Html.ActionLink<AppController>(“Test”, c => c.Test()) )</li>