Show / Hide Table of Contents

Class MeteringLogRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<MeteringLogTableInfo>)

From a TargetedDataRecord<MeteringLogTableInfo>, create and populate a MeteringLogRecordData POCO object

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

FromSelect(TargetedSelect<MeteringLogTableInfo>)

From a TargetedSelect<MeteringLogTableInfo>, execute it and return an IEnumerable<MeteringLogRecordData> with the results

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

FromSelectAsync(TargetedSelect<MeteringLogTableInfo>, CancellationToken)

From a TargetedSelect<MeteringLogTableInfo>, execute it and return an IEnumerable<MeteringLogRecordData> with the results

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

ToInsertAsync(MeteringLogRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<MeteringLogRecordData>, CancellationToken)

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

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

ToRecordData(MeteringLogRow)

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

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