Class KbAttachmentRecordDataExtensions
Extension methods to make it easy to fetch KbAttachmentRecordData objects from the database,
using the TargetedSelect infrastructure
Inheritance
KbAttachmentRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class KbAttachmentRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<KbAttachmentTableInfo>)
Declaration
public static KbAttachmentRecordData FromRecord(this TargetedDataRecord<KbAttachmentTableInfo> record)
Parameters
Returns
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
Returns
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
Returns
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
Returns
ToInsertsAsync(IEnumerable<KbAttachmentRecordData>, CancellationToken)
Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<KbAttachmentRecordData> records, CancellationToken cancellationToken = default)
Parameters
Returns
ToRecordData(KbAttachmentRow)
Declaration
public static KbAttachmentRecordData ToRecordData(this KbAttachmentRow row)
Parameters
Returns