Tortuga.Chain Namespace
Tortuga.Chain.CommandBuilders Namespace
Tortuga.Chain.Metadata Namespace

IMultipleRowDbCommandBuilder<(Of <(<'TObject>)>)>..::..ToMasterDetailCollection<(Of <(<'TDetail>)>)> Method

Materializes the result as a list of master/detail records.

Namespace:  Tortuga.Chain.CommandBuilders
Assembly:  Tortuga.Chain.Core (in Tortuga.Chain.Core.dll)

Syntax


IMasterDetailMaterializer<List<TObject>> ToMasterDetailCollection<TDetail>(
	string masterKeyColumn,
	Func<TObject, ICollection<TDetail>> map,
	CollectionOptions masterOptions,
	CollectionOptions detailOptions
)
Function ToMasterDetailCollection(Of TDetail) ( _
	masterKeyColumn As String, _
	map As Func(Of TObject, ICollection(Of TDetail)), _
	masterOptions As CollectionOptions, _
	detailOptions As CollectionOptions _
) As IMasterDetailMaterializer(Of List(Of TObject))
generic<typename TDetail>
IMasterDetailMaterializer<List<TObject>^>^ ToMasterDetailCollection(
	String^ masterKeyColumn, 
	Func<TObject, ICollection<TDetail>^>^ map, 
	CollectionOptions^ masterOptions, 
	CollectionOptions^ detailOptions
)

Type Parameters

TDetail
The type of the detail model.

Parameters

masterKeyColumn
Type: String
The column used as the primary key for the master records.
map
Type: Func<(Of <(<'TObject, ICollection<(Of <(<'TDetail>)>)>>)>)>
This is used to identify the detail collection property on the master object.
masterOptions
Type: Tortuga.Chain..::..CollectionOptions
Options for handling extraneous rows and constructor selection for the master object.
detailOptions
Type: Tortuga.Chain..::..CollectionOptions
Options for handling constructor selection for the detail objects

Return Value