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