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