Partager via


EntityDataTableAdapter, constructeur (IEntityInstanceEnumerator, UInt32, Int32, Boolean) (Microsoft.Office.Server.ApplicationRegistry.Runtime)

Transforms the specified number of entity instances starting from the specified offset in an IEntityInstanceEnumerator object into a Microsoft ADO.NET DataTable object, and serializes the ID column. Each data row in the table represents an entity instance in the enumerator.

Espace de noms : Microsoft.Office.Server.ApplicationRegistry.Runtime
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)

Syntaxe

'Déclaration
Public Sub New ( _
    dataSource As IEntityInstanceEnumerator, _
    offsetFromStart As UInteger, _
    rowCount As Integer, _
    createSerializedIdColumn As Boolean _
)
'Utilisation
Dim dataSource As IEntityInstanceEnumerator
Dim offsetFromStart As UInteger
Dim rowCount As Integer
Dim createSerializedIdColumn As Boolean

Dim instance As New EntityDataTableAdapter(dataSource, offsetFromStart, rowCount, createSerializedIdColumn)
public EntityDataTableAdapter (
    IEntityInstanceEnumerator dataSource,
    uint offsetFromStart,
    int rowCount,
    bool createSerializedIdColumn
)

Paramètres

  • dataSource
    An IEntityInstanceEnumerator object t to be transformed.
  • offsetFromStart
    The offset from the start of the enumerator. The transform starts from this offset and transforms the number of entity instances specified in the rowCount parameter.
  • rowCount
    The number of entity instances to be transformed.

    Unlike an enumerator that supports streaming, you lose streaming when you convert an enumerator into a table because the entire set of rows is loaded into memory. You can use this constructor to limit the number of rows in the data table.

  • createSerializedIdColumn
    true or false, depending on whether you want to serialize the ID column in the data table.

Remarques

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 ID 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, you should use the EntityInstanceIdEncoder.DecodeEntityInstanceId(ColNameSerializedId) method. This method decodes the identifiers and returns an array of identifier values.

Voir aussi

Référence

EntityDataTableAdapter, classe
Membres EntityDataTableAdapter
Microsoft.Office.Server.ApplicationRegistry.Runtime, espace de noms