What is Scaffolding in Asp.net MVC? - Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework 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.

What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.

Share this

Share on FacebookTweet on TwitterPlus on Google+

2 comments

thanks sir
its help me...

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


EmoticonEmoticon