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