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