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