MultipleRowDbCommandBuilder<(Of <(<'TCommand, TParameter>)>)>..::..ToMasterDetailCollection<(Of <(<'TMaster, TDetail>)>)> Method
Materializes the result as a list of master/detail records.
Namespace:
Tortuga.Chain.CommandBuildersAssembly: Tortuga.Chain.Core (in Tortuga.Chain.Core.dll)
Syntax
public IMasterDetailMaterializer<List<TMaster>> ToMasterDetailCollection<TMaster, TDetail>( string masterKeyColumn, Func<TMaster, ICollection<TDetail>> map, CollectionOptions masterOptions, CollectionOptions detailOptions )
Public Function ToMasterDetailCollection(Of TMaster, TDetail) ( _ masterKeyColumn As String, _ map As Func(Of TMaster, ICollection(Of TDetail)), _ masterOptions As CollectionOptions, _ detailOptions As CollectionOptions _ ) As IMasterDetailMaterializer(Of List(Of TMaster))
public: generic<typename TMaster, typename TDetail> IMasterDetailMaterializer<List<TMaster>^>^ ToMasterDetailCollection( String^ masterKeyColumn, Func<TMaster, ICollection<TDetail>^>^ map, CollectionOptions^ masterOptions, CollectionOptions^ detailOptions )
Type Parameters
- TMaster
- The type of the master model.
- 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 <(<'TMaster, 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