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