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