Creating Custom Scaffolding
What is Scaffolding in MVC
Scaffolding is a Templates for Create, Delete, Edit ,Details. It will reduce the time for developer for creating controller,view for the specific model
This is a Scaffolding package for ASP.NET which is installed via NuGet using ‘Install-Package MvcScaffolding’ command
Using Templates
Step : 1
Create Sample web project
Step : 2
Create custom model as like below
Step : 3
Here we going to install the scaffolding in our project.
GoTo Tools –> Library Package Manager –> Package Manager Console as shown below to install the scaffolding
To install Scaffolding, type below command in below console
cmd : Install-Package MvcScaffolding
Step : 4
Next creating template against custom model by using below command
cmd : Scaffold controller EmployeeModel
After executing the command in console, it will create the template for CRUD Operation as shown below
Output :
After generation of Views, run the application. Now u can perform CURD Operation without extra code.
Leave A Comment