First of all, in order to be able to have multiple GET
methods in the same controller, you must add your custom routes:
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
Then, in your controlller you need to mark the parameter as FromUri
in order to tell the method to expect the parameter from the URI. This way, you will be able to call the method the following way:
/web/api/users/Get?q="your string1"&ex="ex"
public Response<List<UserDTO>> Get([FromUri]string q, [FromUri]string ex)
If this is the only GET
method, you may skip the part with mapping custom routes.
Hope this helps.
Best of luck!