Show / Hide Table of Contents

Class SelectionRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<SelectionTableInfo>)

From a TargetedDataRecord<SelectionTableInfo>, create and populate a SelectionRecordData POCO object

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

FromSelect(TargetedSelect<SelectionTableInfo>)

From a TargetedSelect<SelectionTableInfo>, execute it and return an IEnumerable<SelectionRecordData> with the results

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

ToInsert(SelectionRecordData)

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

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

ToInserts(IEnumerable<SelectionRecordData>)

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

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

ToRecordData(SelectionRow)

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

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