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