What is Scaffolding in Asp.net MVC? | ASPMANTRA | Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server AND WCF snippets and tutorial

What is Scaffolding in Asp.net MVC?

Introduction: in this article I will explain what is Scaffolding in Asp.net MVC.

Description:

Scaffolding is used by many software technologies. It’s a code generate framework in MVC application. Scaffolding provides as quick way to generate code for CRUD (Create, Read, update and Delete) in MVC application. Scaffolding is time saving to write code for application.


To perform scaffolding action in MVC application Right click on Controllers folder >> Add >> Controller. Pop up window will open and choose the second option for template for CRUD action. In Model class choose the class for which you want to perform action, Data context class choose the DbContext model for which action will be performed and Views option (none, Aspx and Razor).

Example:
I have a class Student_Detail and DBContext class TESTEntities in Models for which I want to add Controller. Right click on Controllers folder >> Add >> Controller and pop up window open as shown in below attached snapshot:

Scaffolding


If you do not like the scaffolding template with CRUD than you can select empty or empty read/write actions to write customize code.
If you go with CRUD template see the below attached snapshot:
Scaffolding

Is it helpful?

If yes post your comment to admire my work. You can like me on Facebook, Google+, Linkedin and Twitter via hit on Follow us Button and also can get update follow by Email.

Post a Comment

thanks sir
its help me...

stayed tune for more valuable articles............

[blogger]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget