public IActionResult Index() { var teste = HashIdsUtil.Encode(1); var te = HashIdsUtil.Decode(teste); return(View(AllContacts)); }
public override void OnActionExecuting(ActionExecutingContext context) { foreach (var routeDataValue in context.RouteData.Values) { if (routeDataValue.Key.EndsWith("id", StringComparison.OrdinalIgnoreCase)) { context.ActionArguments[routeDataValue.Key] = HashIdsUtil.Decode(routeDataValue.Value); } } base.OnActionExecuting(context); }