Show / Hide Table of Contents

Class DocumentRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<DocumentTableInfo>)

From a TargetedDataRecord<DocumentTableInfo>, create and populate a DocumentRecordData POCO object

Declaration
public static DocumentRecordData FromRecord(this TargetedDataRecord<DocumentTableInfo> record)
Parameters
Type Name Description
TargetedDataRecord<DocumentTableInfo> record
Returns
Type Description
DocumentRecordData
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 { DocumentItem = r.FromRecord(), /* fetch other fields here */ });

FromSelect(TargetedSelect<DocumentTableInfo>)

From a TargetedSelect<DocumentTableInfo>, execute it and return an IEnumerable<DocumentRecordData> with the results

Declaration
public static IEnumerable<DocumentRecordData> FromSelect(this TargetedSelect<DocumentTableInfo> select)
Parameters
Type Name Description
TargetedSelect<DocumentTableInfo> select
Returns
Type Description
System.Collections.Generic.IEnumerable<DocumentRecordData>
Examples
            var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
            var result = s.FromSelect();

ToInsert(DocumentRecordData)

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

ToInserts(IEnumerable<DocumentRecordData>)

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

ToRecordData(DocumentRow)

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