Class AttachmentRecordDataExtensions
Extension methods to make it easy to fetch AttachmentRecordData objects from the database,
using the TargetedSelect infrastructure
Inheritance
AttachmentRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class AttachmentRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<AttachmentTableInfo>)
From a TargetedDataRecord<AttachmentTableInfo>, create and populate a AttachmentRecordData POCO object
Declaration
public static AttachmentRecordData FromRecord(this TargetedDataRecord<AttachmentTableInfo> 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 { AttachmentItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<AttachmentTableInfo>)
From a TargetedSelect<AttachmentTableInfo>, execute it and return an IEnumerable<AttachmentRecordData> with the results
Declaration
public static IEnumerable<AttachmentRecordData> FromSelect(this TargetedSelect<AttachmentTableInfo> select)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
FromSelectAsync(TargetedSelect<AttachmentTableInfo>, CancellationToken)
From a TargetedSelect<AttachmentTableInfo>, execute it and return an IEnumerable<AttachmentRecordData> with the results
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
public static IAsyncEnumerable<AttachmentRecordData> FromSelectAsync(this TargetedSelect<AttachmentTableInfo> select, CancellationToken cancellationToken = default)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsertAsync(AttachmentRecordData, CancellationToken)
Extension methods to make it easy to fetch AttachmentRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static Task<Insert> ToInsertAsync(this AttachmentRecordData record, CancellationToken cancellationToken = default)
Parameters
Returns
ToInsertsAsync(IEnumerable<AttachmentRecordData>, CancellationToken)
Extension methods to make it easy to fetch AttachmentRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static IAsyncEnumerable<Insert> ToInsertsAsync(this IEnumerable<AttachmentRecordData> records, CancellationToken cancellationToken = default)
Parameters
Returns
ToRecordData(AttachmentRow)
Extension methods to make it easy to fetch AttachmentRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static AttachmentRecordData ToRecordData(this AttachmentRow row)
Parameters
Returns