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

Represents the base class for all entity instances in the Business Data Catalog. This is an abstract class and cannot be instantiated.

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

语法

声明
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public MustInherit Class AbstractEntityInstance
    Inherits AbstractInstance
    Implements IEntityInstance
用法
Dim instance As AbstractEntityInstance
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public abstract class AbstractEntityInstance : AbstractInstance, IEntityInstance

备注

Conceptually, you can think of an entity instance in the Business Data Catalog as a single row of data returned from a back-end business application that has the ability to know which field (or fields in case of composite keys) in the row represents the identifier for the entity instance, and that enables you to call methods such as GetAssociatedInstances, GetIdentifierValues and Execute on that entity instance. In other words, an AbstractEntityInstance adds a persistent identity to the entity instances.

The system-specific DbEntityInstance and WebServiceEntityInstance classes inherit from this class. They represent one row of data from a database and a Web Service, respectively. However, you typically use the IEntityInstance and IEntityInstanceEnumerator objects to work with entity instances in the Business Data Catalog, as opposed to using the system specific implementations of these classes. This is because the IEntityInstance and IEntityInstanceEnumerator objects encapsulate the complexities of the underlying data sources, insulate you from having to learn application-specific coding paradigms, and allow clients to access all business applications in a single, simplified way.

备注

There are two places in the Business Data Catalog where you can execute code in a backend system: on the Entity, and on the instance of an Entity. These two methods of execution correspond to static and instance methods in C# or other object oriented programming languages. Calling .Execute on an Entity essentially requires the user to pass in parameters that mirror the underlying backend API. Calling .Execute on an instance of an Entity causes the Business Data Catalog to automatically plumb the value of the identifiers of the instance of the Entity into the appropriate slots in the backend API, eliminating the need for the end user to provide that information or set up those parameters.

继承层次结构

System.Object
   Microsoft.Office.Server.ApplicationRegistry.Runtime.AbstractInstance
    Microsoft.Office.Server.ApplicationRegistry.Runtime.AbstractEntityInstance
       Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbEntityInstance
       Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.WebService.WebServiceEntityInstance

线程安全性

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

另请参阅

参考

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