title: How to execute GO statement in Entity Framework Migrations CodeFirst
body: <p>when we try to create a new database from our product is gives and error in mirgrations. We are using GO statement in the migrations which is causing the error. Following is the error:</p>
  
  <p>System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'GO'</p>
  
  <p>Following is the migration class created :</p>
  
  <pre><code>namespace One234C.SRC.DomainModel.ORMapping.Migrations
  {
      using System;
      using System.Data.Entity.Migrations;
  
      public partial class AdditionOfBatchCostedFlagColumn : DbMigration
      {
          public override void Up()
          {
              AddColumn("Service.ServiceOrderComponentDetails", "BatchCostedFlag", c =&gt; c.Byte(nullable: true));
              Sql("GO");
              string queryStr ="UPDATE [Service].ServiceOrderComponentDetails " +
                                "SET BatchCostedFlag = 1";
              Sql(queryStr);
              AlterColumn("Service.ServiceOrderComponentDetails", "BatchCostedFlag", c =&gt; c.Byte(nullable: false, defaultValue:0));
          }
  
          public override void Down()
          {
              DropColumn("Service.ServiceOrderComponentDetails", "BatchCostedFlag");
          }
  
      }
  }
  </code></pre>
  
  <p>Is there anyway to do this operation without using go statement in EntityFramework.</p>