OrganizationServiceContextExtensions.AttachLink 方法 (OrganizationServiceContext, Entity, String, Entity, Nullable)
应用到: Microsoft Dynamics CRM 2015, Microsoft Dynamics CRM Online
Attaches a two entity instances.
命名空间: Microsoft.Xrm.Client
程序集: Microsoft.Xrm.Client (在 Microsoft.Xrm.Client.dll 中)
使用情况
用法
Dim context As OrganizationServiceContext
Dim source As Entity
Dim relationshipSchemaName As String
Dim target As Entity
Dim primaryEntityRole As Nullable(Of EntityRole)
OrganizationServiceContextExtensions.AttachLink(context, source, relationshipSchemaName, target, primaryEntityRole)
语法
声明
<ExtensionAttribute> _
Public Shared Sub AttachLink ( _
context As OrganizationServiceContext, _
source As Entity, _
relationshipSchemaName As String, _
target As Entity, _
<OptionalAttribute> Optional primaryEntityRole As Nullable(Of EntityRole) = Nothing _
)
[ExtensionAttribute]
public static void AttachLink (
OrganizationServiceContext context,
Entity source,
string relationshipSchemaName,
Entity target,
[OptionalAttribute] Nullable<EntityRole> primaryEntityRole
)
参数
- context
Type: OrganizationServiceContext. The service context.
- source
Type: Entity. The source entity instance.
- relationshipSchemaName
Type: 字符串. The schema name of the relationship.
- target
Type: Entity. The target entity instance.
- primaryEntityRole
Type: 可为空值<EntityRole>. The role that the entity plays in the relationship, referencing or referenced.
备注
This is an extension to the core AttachLink method.
线程安全性
此类型的所有公共静态(Visual Basic 中的 Shared)成员都是线程安全成员。不保证任何实例成员是线程安全成员。
平台
Development Platforms
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Target Platforms
Windows Server 2008,Windows Server 2012,Windows 7
另请参阅
参考
OrganizationServiceContextExtensions 类
OrganizationServiceContextExtensions 成员
Microsoft.Xrm.Client 命名空间
其他资源
Developer Extensions for Microsoft Dynamics CRM
Access Entity Relationships
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.