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