The GO token commonly used in tools like SSMS isn’t actually SQL. Rather, the tool (SSMS etc)
uses that token to split your query file into separate commands.
DbCommand doesn’t support that usage; it is meant to represent a single
operation.You must issue each part as a separate command.
In the future, Dapper may be able to support that scenario via the newer
DbBatch API, but few providers
support that at present.
Bad:
conn.Execute("""
/* first things */
GO
/* second things */
""");
Good:
conn.Execute("""
/* first things */
""");
conn.Execute("""
/* second things */
""");