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