One of the great things about web API is that it works by convention. Web API is able to route the GET request to HelloApiController
by using the convention of URI path getting mapped to the class name prefix (leaving out Controller). If you have another controller, say FooController
, the URI of http://server/foo
is what is needed to hit your second controller.
As for the method names, it goes by HTTP verb. By default, the method names of Get
and the method names starting with Get
such as GetFoo
is mapped to HTTP GET and so on. This can be changed. The concept of routing is very powerful and it cannot be explained here through an answer. I highly recommend Mike Wasson's getting started stuff in ASP.NET web site. Check out this and the rest of the stuff.