public static void ExecuteFile ( SqlConnection conn, string filePath) { var sqlCmd = new SqlCmd (conn); sqlCmd.ExecuteFile (filePath); }
/// <summary> /// Executes a SQL file on the given connection /// </summary> /// <param name="conn">Connection to execute the file on</param> /// <param name="file">The SQL file being executed</param> public static void ExecuteFile( SqlConnection conn, string filePath) { var sqlCmd = new SqlCmd(conn); sqlCmd.ExecuteFile(filePath); }