Show / Hide Table of Contents

Class ProductFamilyRecordDataExtensions

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

Inheritance
object
ProductFamilyRecordDataExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOfficeCRMRows
Assembly: SoDataBase.dll
Syntax
public static class ProductFamilyRecordDataExtensions

Methods

FromRecord(TargetedDataRecord<ProductFamilyTableInfo>)

From a TargetedDataRecord<ProductFamilyTableInfo>, create and populate a ProductFamilyRecordData POCO object

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

FromSelect(TargetedSelect<ProductFamilyTableInfo>)

From a TargetedSelect<ProductFamilyTableInfo>, execute it and return an IEnumerable<ProductFamilyRecordData> with the results

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

FromSelectAsync(TargetedSelect<ProductFamilyTableInfo>, CancellationToken)

From a TargetedSelect<ProductFamilyTableInfo>, execute it and return an IEnumerable<ProductFamilyRecordData> with the results

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

ToInsertAsync(ProductFamilyRecordData, CancellationToken)

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

ToInsertsAsync(IEnumerable<ProductFamilyRecordData>, CancellationToken)

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

ToRecordData(ProductFamilyRow)

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