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