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