Quote:
From UI we are hitting the data base and retrieving results showing it to the UI.
can you help me out?
No, you normally shouldn't be hitting the DB from the UI in an MVC application.
Client page requests are routed to the appropriate controller and action. So, "http://localhost:4004/home/index" will go to the
HomeController
and the
Index
action.
Inside that action, you'll likely make a call to a repository or something to load your data. This is called your model. So, you're loading your model in your controller, then passing that to your view, the final part of the process.
The view - written either with the new Razor syntax or the ASPX syntax you're used to - is used to generate the HTML output given the model you've provided.
In this light, the process feels much simpler because we throw out a lot of the complexities of the page load/event model stuff, but it is a different paradigm to get used to.
Hope this helps some. Cheers.