Show / Hide Table of Contents

Class ProductRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<ProductTableInfo>)

From a TargetedDataRecord<ProductTableInfo>, create and populate a ProductRecordData POCO object

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

FromSelect(TargetedSelect<ProductTableInfo>)

From a TargetedSelect<ProductTableInfo>, execute it and return an IEnumerable<ProductRecordData> with the results

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

FromSelectAsync(TargetedSelect<ProductTableInfo>, CancellationToken)

From a TargetedSelect<ProductTableInfo>, execute it and return an IEnumerable<ProductRecordData> with the results

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

ToInsertAsync(ProductRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<ProductRecordData>, CancellationToken)

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

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

ToRecordData(ProductRow)

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

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