Let's say I have following simple controller:
public class DataController: Controller
{
[HttpGet]
public ActionResult Index()
{
// some code
}
}
Now I'd like Index action to be allways called if there is a GET request to DataContoller. I other words to ignore action name and any other parameters. For example all of following calls should be handled by Index action:
- https://localhost:5000/data
- https://localhost:5000/data/anything
- https://localhost:5000/data/anything/secondAnything
- https://localhost:5000/data/anything?someParameter=3
How can I achieve this?