I have an ApiController where I have 2 actions:
public IEnumerable<Users> GetUsers(){} public IHttpActionResult UsersPagination(int startindex = 0, int size = 5, string sortby = "Username", string order = "DESC"){}
Since I have default routing like below:
config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } );
I get the error:
Multiple actions were found that match the request: GetUsers on type HomeBook.API.Controllers.UsersController UsersPagination on type HomeBook.API.Controllers.UsersController
Basically, I want 2 actions in my controller: one that returns all users another returns a pagination form of users. Like here: http://dev.librato.com/v1/pagination
Please suggest how I can achieve this.