Show / Hide Table of Contents

Class HierarchyRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<HierarchyTableInfo>)

From a TargetedDataRecord<HierarchyTableInfo>, create and populate a HierarchyRecordData POCO object

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

FromSelect(TargetedSelect<HierarchyTableInfo>)

From a TargetedSelect<HierarchyTableInfo>, execute it and return an IEnumerable<HierarchyRecordData> with the results

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

ToInsert(HierarchyRecordData)

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

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

ToInserts(IEnumerable<HierarchyRecordData>)

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

Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<HierarchyRecordData> records)
Parameters
Type Name Description
IEnumerable<HierarchyRecordData> records
Returns
Type Description
IEnumerable<Insert>

ToRecordData(HierarchyRow)

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

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