"sql argument cannot be null" when including "Go" in EF DbMigration

When adding an SQL server GO commandto a call DbMigration.Sql("GO ...")that calls the entity framework method Update-Databaseto exclude the exception argument, "sql" cannot be null. "

Delete GOand the migration will fail because the next SQL statement creates a trigger, which should be on its own.

+4
source share
1 answer

I did not find absolutely any information on this, so an SO thought could be beneficial.

, , SQL Server GO , , EF SQL ​​.

, DbMigration.Sql(sql, suppressTransaction=false).

suppressTransaction SQL- ( ). GO .

+3

All Articles