dotnet ef migrations add --environment code example Example: asp.net core update-database specify environment $env:ASPNETCORE_ENVIRONMENT='Production'