Show / Hide Table of Contents

Class MessageRecordDataExtensions

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

Inheritance
System.Object
MessageRecordDataExtensions
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public static class MessageRecordDataExtensions : Object

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
System.Collections.Generic.IEnumerable<MessageRecordData>
Examples
            var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
            var result = s.FromSelect();

ToInsert(MessageRecordData)

Declaration
public static Insert ToInsert(this MessageRecordData record)
Parameters
Type Name Description
MessageRecordData record
Returns
Type Description
Insert

ToInserts(IEnumerable<MessageRecordData>)

Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<MessageRecordData> records)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<MessageRecordData> records
Returns
Type Description
System.Collections.Generic.IEnumerable<Insert>

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