Show / Hide Table of Contents

Class InvoiceRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<InvoiceTableInfo>)

From a TargetedDataRecord<InvoiceTableInfo>, create and populate a InvoiceRecordData POCO object

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

FromSelect(TargetedSelect<InvoiceTableInfo>)

From a TargetedSelect<InvoiceTableInfo>, execute it and return an IEnumerable<InvoiceRecordData> with the results

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

FromSelectAsync(TargetedSelect<InvoiceTableInfo>, CancellationToken)

From a TargetedSelect<InvoiceTableInfo>, execute it and return an IEnumerable<InvoiceRecordData> with the results

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

ToInsertAsync(InvoiceRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<InvoiceRecordData>, CancellationToken)

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

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

ToRecordData(InvoiceRow)

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

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