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