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