Show / Hide Table of Contents

Class BusinessRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<BusinessTableInfo>)

From a TargetedDataRecord<BusinessTableInfo>, create and populate a BusinessRecordData POCO object

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

FromSelect(TargetedSelect<BusinessTableInfo>)

From a TargetedSelect<BusinessTableInfo>, execute it and return an IEnumerable<BusinessRecordData> with the results

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

FromSelectAsync(TargetedSelect<BusinessTableInfo>, CancellationToken)

From a TargetedSelect<BusinessTableInfo>, execute it and return an IEnumerable<BusinessRecordData> with the results

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

ToInsertAsync(BusinessRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<BusinessRecordData>, CancellationToken)

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

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

ToRecordData(BusinessRow)

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

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