Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void OnActionExecuting(ActionExecutingContext filterContext)
- {
- var valueProviderResult = filterContext.Controller.ValueProvider.GetValue("<source parameter name>");
- //translation here, you can morph the value as you wish
- if (valueProviderResult != null)
- {
- filterContext.ActionParameters["<destination parameter name"] = yourTranslationService(valueProviderResult.AttemptedValue);
- }
- base.OnActionExecuting(filterContext);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement