Skip to content

Entity Framework Troubleshooting

WILSON DE OLIVEIRA JUNIOR edited this page Mar 5, 2020 · 1 revision

Entity Framework Troubleshooting

04/03/2020

Comandos de migration do Visual Studio

add-migration AddIdentityAndCategory
update-database
drop-database
remove-migration

Para os commando de Entity Framework funcionarem na linha de comando do dotnet pode ser que seja necessário o seguinte comando:

dotnet tool install --global dotnet-ef

Comandos de migrations do Vistual Studio Code

dotnet ef migrations add AddIdentityAndCategory 
dotnet ef database update
dotnet ef database drop
dotnet ef migrations remove

Caso tenha problemas no dotnet ef (Entity Framework Core) acrescente as seguintes bibliotecas a seu projeto:

dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore

Links uteis:

Clone this wiki locally