Show / Hide Table of Contents

Class ScreenChooserRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<ScreenChooserTableInfo>)

From a TargetedDataRecord<ScreenChooserTableInfo>, create and populate a ScreenChooserRecordData POCO object

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

FromSelect(TargetedSelect<ScreenChooserTableInfo>)

From a TargetedSelect<ScreenChooserTableInfo>, execute it and return an IEnumerable<ScreenChooserRecordData> with the results

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

FromSelectAsync(TargetedSelect<ScreenChooserTableInfo>, CancellationToken)

From a TargetedSelect<ScreenChooserTableInfo>, execute it and return an IEnumerable<ScreenChooserRecordData> with the results

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

ToInsertAsync(ScreenChooserRecordData, CancellationToken)

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

ToInsertsAsync(IEnumerable<ScreenChooserRecordData>, CancellationToken)

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

ToRecordData(ScreenChooserRow)

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