EF5 Migrations - Duplicate/Re-defined variable bug when dropping constraints | Issue with usage of SQL GO command

前端 未结 4 1599
灰色年华
灰色年华 2021-01-04 01:37

Background:

We have a project that uses ef-migrations containing multiple (read ~60) migrations created over a long period of development. Naturally, some of these

4条回答
  •  自闭症患者
    2021-01-04 02:18

    As per msdn

    "GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor."

    Since you are not using any of the above tools but SqlCommand class to execute your Sql statement Sql Server (and not EF - see the stack trace where the exception originated) is choking on it

提交回复
热议问题