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