You could just use a SqlCommand to execute your sql-query:
var con = new SqlConnection("connstring");
var cmd = new SqlCommand("query", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
If you have a query with one or more GO statements you will have to split the script to separate all queries and execute them one by one
var fileContent = File.ReadAllText("query.sql");
var sqlqueries = fileContent.Split(new[] {" GO "}, StringSplitOptions.RemoveEmptyEntries);
var con = new SqlConnection("connstring");
var cmd = new SqlCommand("query", con);
con.Open();
foreach (var query in sqlqueries)
{
cmd.CommandText = query;
cmd.ExecuteNonQuery();
}
con.Close();
Probably a good idea to do this in a transaction. Depending on what kind of sql you are executing.