When creating controller in MVC 6 I don't see the scaffolding for creating controller methods? Will they be missing or in the production release?
To add a scaffold, right-click on Controllers folder in the Solution Explorer and select Add → New Scaffolded Item. It will display the Add Scaffold dialog. Select MVC 5 Controller with views, using Entity Framework in the middle pane and click 'Add' button, which will display the Add Controller dialog.
Answer: There are 6 different types of Scaffold templates in ASP.NET MVC that is used to create a view automatically based on the Model selected.
The namespaces have changed in Core 1.0
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.0.0-preview1-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.0.0-preview1-final"
info from:
https://wildermuth.com/2016/05/17/Converting-an-ASP-NET-Core-RC1-Project-to-RC2
If you are referring to CRUD scaffolding for controllers and views with ASP.NET 5 and MVC 6, it has been split off from the Visual Studio GUI and moved to command line.
You'll need a package called CodeGenerators
, add it to your project.json configuration file as:
"dependencies": {
...
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
...
},
At the moment VS does not offer GUI command to perform scaffolding but you can give a look to this link :
ASP.NET 5 (MVC6) Ground Up #4 - Scaffolding CRUD in MVC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With