Show / Hide Table of Contents

Class TravellerRecordDataExtensions

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

Inheritance
object
TravellerRecordDataExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public static class TravellerRecordDataExtensions

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();

FromSelectAsync(TargetedSelect<TravellerTableInfo>, CancellationToken)

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

Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
public static IAsyncEnumerable<TravellerRecordData> FromSelectAsync(this TargetedSelect<TravellerTableInfo> select, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TargetedSelect<TravellerTableInfo> select
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<TravellerRecordData>
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();

ToInsertAsync(TravellerRecordData, CancellationToken)

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

Declaration
public static Task<Insert> ToInsertAsync(this TravellerRecordData record, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TravellerRecordData record
CancellationToken cancellationToken
Returns
Type Description
Task<Insert>

ToInsertsAsync(IEnumerable<TravellerRecordData>, CancellationToken)

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

Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<TravellerRecordData> records, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<TravellerRecordData> records
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<Insert>

ToRecordData(TravellerRow)

Extension methods to make it easy to fetch TravellerRecordData objects from the database, using the TargetedSelect 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