Features

Routing

  • It is a part of ASP.NET under the namespace System.Web.Routing

  • Routing directs incoming request to an MVC controller.

  • Routes are defined during the application startup.

  • Routes are configured in Routeconfig.cs under App_Start folder

  • Routing Maps the URLs to controller action with parameters.

It matches incoming request and maps the request to a controllers action

It constructs outgoing URLs that correspond to the controller actions.

Route Definition

http://<domain>:<portnumber>/{controller}/{actions}/{value}

  • A route table is created in the application’s Global.asax file during the Application Start Event.

  • This file is a special file that contains event handlers for ASP.NET application lifecycle events.

Scaffolfding

  • It is basically a code generation template for MVC application.

  • To perform CRUD(Create, Read, Update and Delete) we need to create model, view for all the functions and controller with each action item. It involves lot of code needs to be written

  • Scaffolding provides a feature to just select template and model, which in turn automatically creates controller with all methods and their views.

Last updated