Class HierarchyRecordDataExtensions
Extension methods to make it easy to fetch HierarchyRecordData objects from the database,
using the TargetedSelect infrastructure
Inheritance
HierarchyRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class HierarchyRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<HierarchyTableInfo>)
From a TargetedDataRecord<HierarchyTableInfo>, create and populate a HierarchyRecordData POCO object
Declaration
public static HierarchyRecordData FromRecord(this TargetedDataRecord<HierarchyTableInfo> record)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
/* add joins, return fields etc. as you wish */
s.ReturnFields.Add(s.Table.All);
var result = s.Records().Select(r => new { HierarchyItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<HierarchyTableInfo>)
From a TargetedSelect<HierarchyTableInfo>, execute it and return an IEnumerable<HierarchyRecordData> with the results
Declaration
public static IEnumerable<HierarchyRecordData> FromSelect(this TargetedSelect<HierarchyTableInfo> select)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
FromSelectAsync(TargetedSelect<HierarchyTableInfo>, CancellationToken)
From a TargetedSelect<HierarchyTableInfo>, execute it and return an IEnumerable<HierarchyRecordData> with the results
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
public static IAsyncEnumerable<HierarchyRecordData> FromSelectAsync(this TargetedSelect<HierarchyTableInfo> select, CancellationToken cancellationToken = default)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsertAsync(HierarchyRecordData, CancellationToken)
Extension methods to make it easy to fetch HierarchyRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static Task<Insert> ToInsertAsync(this HierarchyRecordData record, CancellationToken cancellationToken = default)
Parameters
Returns
ToInsertsAsync(IEnumerable<HierarchyRecordData>, CancellationToken)
Extension methods to make it easy to fetch HierarchyRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<HierarchyRecordData> records, CancellationToken cancellationToken = default)
Parameters
Returns
ToRecordData(HierarchyRow)
Extension methods to make it easy to fetch HierarchyRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static HierarchyRecordData ToRecordData(this HierarchyRow row)
Parameters
Returns