2

In my team we have coding rule that requires that every function's parameter starts with prefix, e.g. *p_someParam*.

With Web Api if we want to request a GET function that takes two parameters, we should add those parameters like "...?p_firstParam=value1&p_secondParam=value2".

Is there some way to use in requests more user-friendly names, like someParam without prefix, that will automatically map to parameters in controller's action? Maybe there is some attribute to rename action parameters? I couldn't find any similar example.

Every clue is appreciated.

Rav
  • 97
  • 7

1 Answers1

0

I think you looking for URL rewriting, in that you need to map the urls to config or programmatic

http://www.codeproject.com/Articles/2538/URL-Rewriting-with-ASP-NET nice article to follow, its in ASP.Net,

indiPy
  • 7,844
  • 3
  • 28
  • 39
  • 1
    That's nice, but I've just found the answered question that is more corresponding :) http://stackoverflow.com/questions/12298409/custom-parameter-names-with-special-characters-in-asp-net-web-api-mvc-4 – Rav Nov 29 '12 at 13:20