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