SqlBuilder._ForEach<T> Method

Appends to the current clause the string made by concatenating an itemFormat for each element in items, interspersed with separator.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public SqlBuilder _ForEach<T>(
	IEnumerable<T> items,
	string format,
	string itemFormat,
	string separator,
	Func<T, Object[]> parametersFactory
)

Parameters

items

Type: System.Collections.Generic.IEnumerable<T>
The collection of objects that contain parameters.

format

Type: System.String
The clause body format string, which must contain a {0} placeholder. This parameter can be null.

itemFormat

Type: System.String
The item format.

separator

Type: System.String
The string to use as separator between each item format.

parametersFactory

Type: System.Func<T, Object[]>
The delegate that extract parameters for each element in items. This parameter can be null.

Type Parameters

T

The type of elements in items.

Return Value

Type: SqlBuilder
A reference to this instance after the append operation has completed.

See Also

Reference

SqlBuilder Class
DbExtensions Namespace

© Max Toro Q.