Show / Hide Table of Contents

Class MessageRecordDataExtensions

Extension methods to make it easy to fetch MessageRecordData objects from the database, using the TargetedSelect infrastructure

Inheritance
object
MessageRecordDataExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOfficeCRMRows
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
Type Name Description
TargetedDataRecordMessageTableInfo record
Returns
Type Description
MessageRecordData
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
Type Name Description
TargetedSelectMessageTableInfo select
Returns
Type Description
IEnumerableMessageRecordData
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
Type Name Description
TargetedSelectMessageTableInfo select
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerableMessageRecordData
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
Type Name Description
MessageRecordData record
CancellationToken cancellationToken
Returns
Type Description
TaskInsert

ToInsertsAsync(IEnumerable<MessageRecordData>, CancellationToken)

Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<MessageRecordData> records, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerableMessageRecordData records
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerableInsert

ToRecordData(MessageRow)

Declaration
public static MessageRecordData ToRecordData(this MessageRow row)
Parameters
Type Name Description
MessageRow row
Returns
Type Description
MessageRecordData
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top