Class ForeignKeyRecordDataExtensions
Extension methods to make it easy to fetch ForeignKeyRecordData objects from the database,
using the infrastructure
Inheritance
ForeignKeyRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class ForeignKeyRecordDataExtensions : Object
Methods
FromRecord(TargetedDataRecord<ForeignKeyTableInfo>)
From a TargetedDataRecord<ForeignKeyTableInfo>, create and populate a ForeignKeyRecordData POCO object
Declaration
public static ForeignKeyRecordData FromRecord(this TargetedDataRecord<ForeignKeyTableInfo> 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 { ForeignKeyItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<ForeignKeyTableInfo>)
From a TargetedSelect<ForeignKeyTableInfo>, execute it and return an IEnumerable<ForeignKeyRecordData> with the results
Declaration
public static IEnumerable<ForeignKeyRecordData> FromSelect(this TargetedSelect<ForeignKeyTableInfo> select)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsert(ForeignKeyRecordData)
Extension methods to make it easy to fetch ForeignKeyRecordData objects from the database,
using the infrastructure
Declaration
public static Insert ToInsert(this ForeignKeyRecordData record)
Parameters
Returns
ToInserts(IEnumerable<ForeignKeyRecordData>)
Extension methods to make it easy to fetch ForeignKeyRecordData objects from the database,
using the infrastructure
Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<ForeignKeyRecordData> records)
Parameters
Returns
ToRecordData(ForeignKeyRow)
Extension methods to make it easy to fetch ForeignKeyRecordData objects from the database,
using the infrastructure
Declaration
public static ForeignKeyRecordData ToRecordData(this ForeignKeyRow row)
Parameters
Returns