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