Microsoft.SqlServer.TransactSql.ScriptDom by Microsoft

<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="161.9109.0" />

.NET API 5,160,480 bytes

 IfStatement

public class IfStatement : TSqlStatement
Represents the if statement.
public TSqlStatement ElseStatement { get; set; }

The statement that will be executed if the predicate evaluates false. Optional, may be null.

public BooleanExpression Predicate { get; set; }

The expression that is the predicate for the if statement. This should be a boolean expression.

public TSqlStatement ThenStatement { get; set; }

The statement that will be executed if the predicate evaluates true.

public IfStatement()