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