Show / Hide Table of Contents

Class PhoneRecordDataExtensions

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

Inheritance
object
PhoneRecordDataExtensions
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 PhoneRecordDataExtensions

Methods

FromRecord(TargetedDataRecord<PhoneTableInfo>)

From a TargetedDataRecord<PhoneTableInfo>, create and populate a PhoneRecordData POCO object

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

FromSelect(TargetedSelect<PhoneTableInfo>)

From a TargetedSelect<PhoneTableInfo>, execute it and return an IEnumerable<PhoneRecordData> with the results

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

FromSelectAsync(TargetedSelect<PhoneTableInfo>, CancellationToken)

From a TargetedSelect<PhoneTableInfo>, execute it and return an IEnumerable<PhoneRecordData> with the results

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

ToInsertAsync(PhoneRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<PhoneRecordData>, CancellationToken)

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

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

ToRecordData(PhoneRow)

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

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