Application can't scaffold items
I had this problem too,
I solved the problem by calling the base.onModelCreating in my DB context
base.OnModelCreating(modelBuilder);
Asp.Net Core MVC Movie App - Scaffolding Item not working properly
After going through the above suggestions, I still wasn't able to get the proper items to display for me. I then finally decided to uninstall Visual Studio 2017 and do a fresh install. I created my project, added the Entity Framework dependency, and now the proper items are displaying.
Scaffolding missing in dotnetcore 1.1 application VS2017
Newly created ASP.NET Core Project, Right-click on the Controllers folder in Solution Explorer and select Add > New Scaffolded Item.
This will ask for Add MVC Dependencies dialog. In this, select Minimal Dependencies, and select Add.
Visual Studio adds the dependencies needed to scaffold a controller, including a package with design-time EF functionality (Microsoft.EntityFrameworkCore.Design
). A package that is needed only for scaffolding a DbContext from an existing database is also included (Microsoft.EntityFrameworkCore.SqlServer.Design
).
After this, when you right click on the Controllers folder in Solution Explorer and select Add > New Scaffolded Item.
This will give you 'Add Scaffold' dialog box where you can select options like MVC controller with views, using Entity Framework
Hope this will help.
Related Topics
Why Can't Reference to Child Class Object Refer to the Parent Class Object
Wcf Service Attribute to Log Method Calls and Exceptions
Onchange Event for HTML.Dropdownlist
Entity Framework Specification Pattern Implementation
How to Fix Ill-Formed HTML with HTML Agility Pack
The Call Stack Does Not Say "Where You Came From", But "Where You Are Going Next"
How to Run Sonarqube Code Analysis for .Net Core (C#) on Linux
Calling a SQL User-Defined Function in a Linq Query
Mvc-Web API: 405 Method Not Allowed
Register Iauthenticationmanager with Simple Injector
Return Contents of a Std::Wstring from C++ into C#
Logoff Interactive Users in Windows from a Service
Is Correct to Use Gc.Collect(); Gc.Waitforpendingfinalizers();
Asp.Net MVC Using Web API to Return a Razor View
String.Format() Giving "Input String Is Not in Correct Format"
Print HTML Document from Windows Service in C# Without Print Dialog