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