I have a question that I have been thinking about.
What happens from when I enter an URL in my browser and click enter to when the code in the corresponding controller actually executes?
Let's say I have an asp.net mvc application and a trivial Controller like this:
public class HomeController : Controller
{
public ActionResult About(int id = 25)
{
//code
}
}
So if I enter like myUrl/home/about?id=56 that controller gets invoked. I know there is a routing pattern like {controller}/{action}/{id} declared by default. But if an URL matches that pattern is a controller instance created then or what happens? Is there some Resolver class or similar? Is there like a List containing all the controllers so "Home" in the URL matches the HomeController?
I know the id parameter in the controller signature will be bound to the corresponding id value in the request context with the help of model binding. But there must be a lot of other magic happening here.
Hope someone can help a fresh confused asp.net mvc user