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