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