Sql.ParamTuple method (1 of 2)

Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values, surrounded by parentheses.

public static Sql ParamTuple(IEnumerable values)

Remarks

Empty SQL fragments are ignored. Since it would otherwise result in a confusing SQL syntax error, an InvalidOperationException is thrown if the collection of values is empty. Use Sql.Format($"({Sql.Join(", ", values.Select(Sql.Param))})") to permit an empty tuple.

See Also


Sql.ParamTuple method (2 of 2)

Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values, surrounded by parentheses.

public static Sql ParamTuple(IEnumerable<object?> values)

Remarks

Empty SQL fragments are ignored. Since it would otherwise result in a confusing SQL syntax error, an InvalidOperationException is thrown if the collection of values is empty. Use Sql.Format($"({Sql.Join(", ", values.Select(Sql.Param))})") to permit an empty tuple.

See Also