EntityDataTableAdapter Constructor (IEntityInstanceEnumerator, Boolean)
NOTE: This API is now obsolete.
Transforms an IEntityInstanceEnumerator object into a Microsoft ADO.NET DataTable object, and serializes the identifier column. Each data row in the table represents an entity instance in the enumerator.
Namespace: Microsoft.Office.Server.ApplicationRegistry.Runtime
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Syntax
'Declaration
<ObsoleteAttribute("O12 Application Registry API is deprecated. Please use BusinessData.", _
False)> _
Public Sub New ( _
dataSource As IEntityInstanceEnumerator, _
createSerializedIdColumn As Boolean _
)
'Usage
Dim dataSource As IEntityInstanceEnumerator
Dim createSerializedIdColumn As Boolean
Dim instance As New EntityDataTableAdapter(dataSource, _
createSerializedIdColumn)
[ObsoleteAttribute("O12 Application Registry API is deprecated. Please use BusinessData.",
false)]
public EntityDataTableAdapter(
IEntityInstanceEnumerator dataSource,
bool createSerializedIdColumn
)
Parameters
dataSource
Type: Microsoft.Office.Server.ApplicationRegistry.Runtime.IEntityInstanceEnumeratorAn IEntityInstanceEnumerator object to be transformed.
createSerializedIdColumn
Type: System.Booleantrue or false, depending on whether you want the identifier column in the data table to be serialized. An Entity can have multiple identifiers, and therefore to uniquely identify an instance, you may need more than one field to make up a composite key. Setting this flag to true, will result in an extra column being added to the DataTable created, with colName '__serializedId'. This will contain a String that represents an encoded, serialized form of all the identifier values for the entity instance represented by the row in the DataTable.
Remarks
When entity instances are transformed into data rows in a data table, they lose the special semantics attached to them in the Business Data Catalog, such as the ability to call instance methods on them. Serializing the identifier column enables you to call instance methods. You can access the ID column using the name ColNameSerializedId.
Because the Business Data Catalog encodes the ID column, you must decode the ID column before you can use the ID values. To decode the ID column, use the EntityInstanceIdEncoder.DecodeEntityInstanceId(ColNameSerializedId) method. This method decodes the identifiers and returns an array of identifier values.
See Also
Reference
EntityDataTableAdapter Members
EntityDataTableAdapter Overload
Microsoft.Office.Server.ApplicationRegistry.Runtime Namespace