Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 852 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 852 Bytes

Commands to work with EF Migration & Docker

.NET CLI Tools

  • This Tool is useful for Migrations
dotnet tool list --global
dotnet tool install --global dotnet-ef
Install-Package Microsoft.EntityFrameworkCore.Tools // Power Shell
dotnet ef migrations add InitialCreate -p Donation.Infrastructure -s Donation.Api

Docker

docker pull mcr.microsoft.com/mssql/server:2022-latest
docker image ls
docker run -e 'HOMEBREW_NO_ENV_FILTERING=1' -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Asdf@1234' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
docker container ls
docker ps
dotnet ef database update -p Donation.Infrastructure -s Donation.Api --connection "Server=localhost;Database=Donation;User Id=sa;Password=Asdf@1234;Encrypt=false"

dotnet clean
dotnet restore
dotnet build
dotnet run --project Donation.Api