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