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