Wednesday, 31 March 2021

Responsibility of asp.net core mvc controller

 

Controller class has responsibility to respond incoming request URL by invoking appropriate action method. Controller chooses appropriate model or retrieves data from data source and passes this data to appropriate View template which generates HTML, controller sends this html response back to the caller/ user.

In other words, controller invokes appropriate action from requested URL, selects/generates data and sends this data to view, view renders data and generates appropriate HTML and Controller sends response back to the client.

No comments:

Post a Comment

How to create and use middleware in asp.net core

Middleware is piece of code that's assembled into an app pipeline to handle requests and responses.  Each middleware component in the re...