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