Class BusinessRecordDataExtensions
Extension methods to make it easy to fetch BusinessRecordData objects from the database,
using the
Inheritance
System.Object
BusinessRecordDataExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public static class BusinessRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<BusinessTableInfo>)
From a TargetedDataRecord<BusinessTableInfo>, create and populate a BusinessRecordData POCO object
Declaration
public static BusinessRecordData FromRecord(this TargetedDataRecord<BusinessTableInfo> record)
Parameters
Type | Name | Description |
---|---|---|
TargetedDataRecord<BusinessTableInfo> | record |
Returns
Type | Description |
---|---|
BusinessRecordData |
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 { BusinessItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<BusinessTableInfo>)
From a TargetedSelect<BusinessTableInfo>, execute it and return an IEnumerable<BusinessRecordData> with the results
Declaration
public static IEnumerable<BusinessRecordData> FromSelect(this TargetedSelect<BusinessTableInfo> select)
Parameters
Type | Name | Description |
---|---|---|
TargetedSelect<BusinessTableInfo> | select |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BusinessRecordData> |
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsert(BusinessRecordData)
Declaration
public static Insert ToInsert(this BusinessRecordData record)
Parameters
Type | Name | Description |
---|---|---|
BusinessRecordData | record |
Returns
Type | Description |
---|---|
Insert |
ToInserts(IEnumerable<BusinessRecordData>)
Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<BusinessRecordData> records)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<BusinessRecordData> | records |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Insert> |