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