This application uses Entity Framework Core to scaffold an existing AdventureWorks 2019 database.
Use the .NET Core CLI to scaffold the existing database, placing the generated models in the Models folder:
dotnet user-secrets init
dotnet user-secrets set ConnectionStrings:AdventureWorks2019 "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AdventureWorks2019"
dotnet ef dbcontext scaffold Name=ConnectionStrings:AdventureWorks2019 Microsoft.EntityFrameworkCore.SqlServer -o Models
Once the DbContext is created, you can now generate pages using aspnet-codegenerator tooling, placing the generated Controllers in the Controllers folder:
dotnet aspnet-codegenerator controller -name ProductsController -m Products -dc AdventureWorks2019Context --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries