Class SqlScripExecutor
Represents an implementation of the IScriptExecutor interface for executing SQL scripts against a SQL Server database using a given connection string.
public class SqlScripExecutor : IScriptExecutor
- Inheritance
-
SqlScripExecutor
- Implements
- Inherited Members
Examples
This class is intended for use with SQL Server environments and supports SQL scripts containing CREATE DATABASE, USE, and CREATE TYPE commands.
Remarks
This class processes and executes SQL scripts, handling specific constructs such as database creation, database switching (USE statements), and user-defined type creation. The scripts are parsed and executed in multiple steps, ensuring proper handling of dependencies and execution order.
Methods
Execute(string, string)
Executes a SQL script against the specified database connection.
public void Execute(string connectionString, string script)