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