Show / Hide Table of Contents

Class ContactRecordDataExtensions

Extension methods to make it easy to fetch ContactRecordData objects from the database, using the infrastructure

Inheritance
Object
ContactRecordDataExtensions
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public static class ContactRecordDataExtensions

Methods

FromRecord(TargetedDataRecord<ContactTableInfo>)

From a TargetedDataRecord<ContactTableInfo>, create and populate a ContactRecordData POCO object

Declaration
public static ContactRecordData FromRecord(this TargetedDataRecord<ContactTableInfo> record)
Parameters
Type Name Description
TargetedDataRecord<ContactTableInfo> record
Returns
Type Description
ContactRecordData
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 { ContactItem = r.FromRecord(), /* fetch other fields here */ });

FromSelect(TargetedSelect<ContactTableInfo>)

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
Type Name Description
TargetedSelect<ContactTableInfo> select
Returns
Type Description
IEnumerable<ContactRecordData>
Examples
            var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
            var result = s.FromSelect();

ToInsert(ContactRecordData)

Declaration
public static Insert ToInsert(this ContactRecordData record)
Parameters
Type Name Description
ContactRecordData record
Returns
Type Description
Insert

ToInserts(IEnumerable<ContactRecordData>)

Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<ContactRecordData> records)
Parameters
Type Name Description
IEnumerable<ContactRecordData> records
Returns
Type Description
IEnumerable<Insert>
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top