Show / Hide Table of Contents

Class TravellerRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<TravellerTableInfo>)

From a TargetedDataRecord<TravellerTableInfo>, create and populate a TravellerRecordData POCO object

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

FromSelect(TargetedSelect<TravellerTableInfo>)

From a TargetedSelect<TravellerTableInfo>, execute it and return an IEnumerable<TravellerRecordData> with the results

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

ToInsert(TravellerRecordData)

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

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

ToInserts(IEnumerable<TravellerRecordData>)

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

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

ToRecordData(TravellerRow)

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

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