dotnet add
.\Application\Application.csproj reference
.\Domain\Domain.csproj
dotnet add
.\Infrastructure\Infrastructure.csproj reference
.\Application\Application.csproj
dotnet add
.\Infrastructure\Infrastructure.csproj reference
.\Domain\Domain.csproj
dotnet add
.\Presentation\Presentation.csproj reference
.\Infrastructure\Infrastructure.csproj
dotnet add
.\Presentation\Presentation.csproj reference
.\Application\Application.csproj
Irei instalar os pacotes do EntityFrameworkCore necessários para cada camada do projeto.
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.EntityFrameworkCore.Design
- Instalar o
dotnet ef
.
dotnet tool install --global dotnet-ef
- Adicionando a Migration
dotnet ef migrations add InitialCreate
--project .\Infrastructure\Infrastructure.csproj
--startup-project .\Presentation\Presentation.csproj
- Criando ou Alterando o Banco de Dados
dotnet ef database update
--project .\Infrastructure\Infrastructure.csproj
--startup-project .\Presentation\Presentation.csproj