Method AddRelation
AddRelation<TChild>(string, Func<T, IEnumerable<TChild>?>, MergeFieldMap<TChild>)
Registers a child collection a nested «TableStart:name» region repeats over.
public MergeFieldMap<T> AddRelation<TChild>(string name, Func<T, IEnumerable<TChild>?> accessor, MergeFieldMap<TChild> childMap)
Parameters
namestringThe region name, matched ordinal-ignore-case.
accessorFunc<T, IEnumerable<TChild>>Reads the child collection off a record. May return null, which merges as a region with no rows.
childMapMergeFieldMap<TChild>The child records' field map.
Returns
- MergeFieldMap<T>
This map, for chaining.
Type Parameters
TChildThe child record type.
Exceptions
- ArgumentNullException
Any argument is null.
- ArgumentException
nameis empty or already registered.