Show / Hide Table of Contents

Class UsageStatsRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<UsageStatsTableInfo>)

From a TargetedDataRecord<UsageStatsTableInfo>, create and populate a UsageStatsRecordData POCO object

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

FromSelect(TargetedSelect<UsageStatsTableInfo>)

From a TargetedSelect<UsageStatsTableInfo>, execute it and return an IEnumerable<UsageStatsRecordData> with the results

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

FromSelectAsync(TargetedSelect<UsageStatsTableInfo>, CancellationToken)

From a TargetedSelect<UsageStatsTableInfo>, execute it and return an IEnumerable<UsageStatsRecordData> with the results

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

ToInsertAsync(UsageStatsRecordData, CancellationToken)

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

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

ToInsertsAsync(IEnumerable<UsageStatsRecordData>, CancellationToken)

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

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

ToRecordData(UsageStatsRow)

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

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