We have a build pipeline running that creates a sql script using dotnet ef migrations script -Idempotent and this is executed in our release pipeline using the task "Azure SQL Database deployment" using Invoke-Sqlcmd -ServerInstance "XXXXXXXXX" -Database "XXXXXX" -Username "XXXXXXX" -Password ****** -Inputfile "XXXXXXXXXX" -ConnectionTimeout 1800
However we would like to run the migration in a transaction, because now, if the migration fail, we end up in a state were the migration is half-completed.
Any ideas?