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