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