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