Show / Hide Table of Contents

Class AssociateRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<AssociateTableInfo>)

From a TargetedDataRecord<AssociateTableInfo>, create and populate a AssociateRecordData POCO object

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

FromSelect(TargetedSelect<AssociateTableInfo>)

From a TargetedSelect<AssociateTableInfo>, execute it and return an IEnumerable<AssociateRecordData> with the results

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

FromSelectAsync(TargetedSelect<AssociateTableInfo>, CancellationToken)

From a TargetedSelect<AssociateTableInfo>, execute it and return an IEnumerable<AssociateRecordData> with the results

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

ToInsertAsync(AssociateRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<AssociateRecordData>, CancellationToken)

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

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

ToRecordData(AssociateRow)

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

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