Share via


EntityDataTableAdapter 类 (Microsoft.Office.Server.ApplicationRegistry.Runtime)

Transforms an IEntityInstanceEnumerator object into a Microsoft ADO.NET DataTable object. Each data row in the table represents an entity instance in the enumerator.

命名空间: Microsoft.Office.Server.ApplicationRegistry.Runtime
程序集: Microsoft.SharePoint.Portal (在 microsoft.sharepoint.portal.dll 中)

语法

声明
<DefaultMemberAttribute("Item")> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class EntityDataTableAdapter
用法
Dim instance As EntityDataTableAdapter
[DefaultMemberAttribute("Item")] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class EntityDataTableAdapter

备注

The DataTable object is a central object in the ADO.NET library, and represents one table of in-memory data.

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.

Also, unlike an enumerator that supports streaming, you lose streaming when you transform an enumerator into a data table because the entire set of rows is loaded into memory at once.

Also there is a performance hit to set up the DataTable schema, rows and copy and set up all the fields.

Therefore, because the above three reasons, use the enumerator instead of the DataTable object whenever possible.

继承层次结构

System.Object
  Microsoft.Office.Server.ApplicationRegistry.Runtime.EntityDataTableAdapter

线程安全性

此类型的任何公共静态( Visual Basic 中共享)成员是线程安全的。不保证任何实例成员都是线程安全的。

另请参阅

参考

EntityDataTableAdapter 成员
Microsoft.Office.Server.ApplicationRegistry.Runtime 命名空间