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