TemplateEngine.Instantiate

Instantiate(DataTable, IColumnMappingCollection)

Instantiates the template with a DataTable as datasource.

public MailMessageCollection Instantiate(DataTable table, IColumnMappingCollection mappings)
ParameterTypeDescription
tableDataTableThe DataTable, which contains the source data to instantiate the template.
mappingsIColumnMappingCollectionThe IColumnMappingCollection, which represents the mapping between the source column in DataTable and target field in template

Return Value

A MailMessageCollection that generated by the template and the datasource.

See Also


Instantiate(DataTable)

Instantiates the template with a DataTable as datasource.

public MailMessageCollection Instantiate(DataTable table)
ParameterTypeDescription
tableDataTableThe DataTable, which contains the source data to instantiate the template.

Return Value

A MailMessageCollection that generated by the template and the datasource.

See Also


Instantiate(DataRowCollection, IColumnMappingCollection)

Instantiates the template with a DataRowCollection as datasource.

public MailMessageCollection Instantiate(DataRowCollection rows, IColumnMappingCollection mappings)
ParameterTypeDescription
rowsDataRowCollectionThe DataRowCollection, which contains the source data to instantiate the template.
mappingsIColumnMappingCollectionThe IColumnMappingCollection, which represents the mapping between the source column in data source and target field in template

Return Value

A MailMessageCollection that generated by the template and the datasource.

See Also


Instantiate(DataRowCollection)

Instantiates the template with a DataRowCollection as datasource.

public MailMessageCollection Instantiate(DataRowCollection rows)
ParameterTypeDescription
rowsDataRowCollectionThe DataRowCollection, which contains the source data to instantiate the template.

Return Value

A MailMessageCollection that generated by the template and the datasource.

See Also


Instantiate(IDataReader)

Instantiates the template with a IDataReader as datasource.

public MailMessageCollection Instantiate(IDataReader reader)
ParameterTypeDescription
readerIDataReaderThe IDataReader, which will provide the source data to instantiate the template.

Return Value

A MailMessageCollection that generated by the template and the datasource.

See Also