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