Define your routes using attributes on action methods in ASP.NET MVC and Web API.