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: SuperOffice.CRM.Rows
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
TargetedDataRecord<MessageTableInfo> 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
TargetedSelect<MessageTableInfo> select
Returns
Type Description
IEnumerable<MessageRecordData>
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
TargetedSelect<MessageTableInfo> select
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<MessageRecordData>
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();

ToInsertAsync(MessageRecordData, CancellationToken)

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

Declaration
public static Task<Insert> ToInsertAsync(this MessageRecordData record, CancellationToken cancellationToken = default)
Parameters
Type Name Description
MessageRecordData record
CancellationToken cancellationToken
Returns
Type Description
Task<Insert>

ToInsertsAsync(IEnumerable<MessageRecordData>, CancellationToken)

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

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

ToRecordData(MessageRow)

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

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