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