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