Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created July 17, 2021 11:25
var controllerName = nameof(ProductController);
var controller = controllerName.Remove(
controllerName.LastIndexOf(
"Controller",
StringComparison.Ordinal));
var link = Url.Action(
nameof(ProductController.Get),
controller,
new { id = Id });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment