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