When trying to scaffold with asp.net core this command
scaffold-dbcontext \"Data Source=(local);Initial Catalog=MyDb;Integrated Security=True;\" M
Scaffold command is part of dbcontext command in EF. Below are the details for successful scaffold:
Package references required:
So our scaffold command should look like:
dotnet ef dbcontext scaffold "Server=localhost\SQLEXPRESS;Database=MyDatabase;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o OutputDirectory
Your Server value might differ as per your Db server name. Replace MyDatabase with your Database name like master and OutputDirectory to the location you want your newly created scaffolded classes like Models folder.