Re-Scaffold views after changing their model

Yes, you can re-scaffold by scaffolding the same model again, using the same model class and controller names as before. Your existing controller and views will be replaced.

Details: Right click on your project or controller folder,

Add ... New Scaffolded Item,

MVC 5 Controller with views using Entity Framework,

Add

Choose your model and data class,

And ensure your controller name is the same as the one to replace.


I use version control - GIT to do it quickly and safely. I use Git Extensions (http://code.google.com/p/gitextensions/) user interface for git.

Have your code commited before re-scaffolding. Then re-scaffold the views, and go to staging (the button Commit in Git Extensions). It shows all changes that re-scaffold made and colors the new and deleted code lines. From there you can stage only the selected new lines, that changed in controller. After staging selected lines, reset the unstaged other changes.

There you have it! Your already modified code with new scaffolded parts. Do any edits and testing necessary and commit.