I am having trouble sending a SQL statement through a DbContext using context.Database.ExecuteSqlCommand()
.
I am trying to execute
CREA
Dave Markle beat me to it. In fact, you can change "GO" to any other string to separate batches.
An alternative implementation here is to use SMO instead of the Entity Framework. There is a useful method there called ExecuteNonQuery that I think will make your life a lot simpler. Here is a good implementation example.