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