Show / Hide Table of Contents

Class KbAttachmentRecordDataExtensions

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

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

Methods

FromRecord(TargetedDataRecord<KbAttachmentTableInfo>)

From a TargetedDataRecord<KbAttachmentTableInfo>, create and populate a KbAttachmentRecordData POCO object

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

FromSelect(TargetedSelect<KbAttachmentTableInfo>)

From a TargetedSelect<KbAttachmentTableInfo>, execute it and return an IEnumerable<KbAttachmentRecordData> with the results

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

FromSelectAsync(TargetedSelect<KbAttachmentTableInfo>, CancellationToken)

From a TargetedSelect<KbAttachmentTableInfo>, execute it and return an IEnumerable<KbAttachmentRecordData> with the results

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

ToInsertAsync(KbAttachmentRecordData, CancellationToken)

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

ToInsertsAsync(IEnumerable<KbAttachmentRecordData>, CancellationToken)

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

ToRecordData(KbAttachmentRow)

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