Skip to content

Instantly share code, notes, and snippets.

@robsonfaxas
Last active April 24, 2020 16:50
Show Gist options
  • Save robsonfaxas/a53cb3bed9e9a0f39f1eb9b9d45719eb to your computer and use it in GitHub Desktop.
Save robsonfaxas/a53cb3bed9e9a0f39f1eb9b9d45719eb to your computer and use it in GitHub Desktop.
[ASP.NET Core TW - EF Creating Views with Scaffolding] Criando Views baseadas em tabelas já existentes por scaffolding #DotNetCore
// Antes, para rodar o scaffolding, é necessário ter o package EntityFrameworkCore.SqlServer:
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
// Use o comando abaixo para criar controller e views automaticamente para Pessoa: create, edit, details, delete e index
dotnet aspnet-codegenerator controller -name PessoasController --model HelloWorldAspNetCore.Models.Pessoa --dataContext HelloWorldAspNetCore.Context.HelloWorldAspNetCoreDbContext --relativ
eFolderPath Controllers --useDefaultLayout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment