Class SelectionRecordDataExtensions
Extension methods to make it easy to fetch SelectionRecordData objects from the database,
using the TargetedSelect infrastructure
Inheritance
SelectionRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class SelectionRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<SelectionTableInfo>)
From a TargetedDataRecord<SelectionTableInfo>, create and populate a SelectionRecordData POCO object
Declaration
public static SelectionRecordData FromRecord(this TargetedDataRecord<SelectionTableInfo> 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 { SelectionItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<SelectionTableInfo>)
From a TargetedSelect<SelectionTableInfo>, execute it and return an IEnumerable<SelectionRecordData> with the results
Declaration
public static IEnumerable<SelectionRecordData> FromSelect(this TargetedSelect<SelectionTableInfo> select)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
FromSelectAsync(TargetedSelect<SelectionTableInfo>, CancellationToken)
From a TargetedSelect<SelectionTableInfo>, execute it and return an IEnumerable<SelectionRecordData> with the results
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
public static IAsyncEnumerable<SelectionRecordData> FromSelectAsync(this TargetedSelect<SelectionTableInfo> select, CancellationToken cancellationToken = default)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsertAsync(SelectionRecordData, CancellationToken)
Extension methods to make it easy to fetch SelectionRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static Task<Insert> ToInsertAsync(this SelectionRecordData record, CancellationToken cancellationToken = default)
Parameters
Returns
ToInsertsAsync(IEnumerable<SelectionRecordData>, CancellationToken)
Extension methods to make it easy to fetch SelectionRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<SelectionRecordData> records, CancellationToken cancellationToken = default)
Parameters
Returns
ToRecordData(SelectionRow)
Extension methods to make it easy to fetch SelectionRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static SelectionRecordData ToRecordData(this SelectionRow row)
Parameters
Returns