Поделиться через


OrganizationServiceContextExtensions.AttachClone<T> Method (OrganizationServiceContext, T, Boolean)

 

Applies To: Dynamics CRM 2015

Clones an arbitrary source entity and attaches it to the context.

Namespace:   Microsoft.Xrm.Client
Assembly:  Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)

Syntax

public static T AttachClone<T>(
    this OrganizationServiceContext context,
    T entity,
    bool includeRelatedEntities = false
)
where T : Entity
public:
generic<typename T>
where T : Entity
[ExtensionAttribute]
static T AttachClone(
    OrganizationServiceContext^ context,
    T entity,
    bool includeRelatedEntities = false
)
static member AttachClone<'T when 'T : Entity> : 
        context:OrganizationServiceContext *
        entity:'T *
        includeRelatedEntities:bool = false -> 'T
<ExtensionAttribute>
Public Shared Function AttachClone(Of T As Entity) (
    context As OrganizationServiceContext,
    entity As T,
    includeRelatedEntities As Boolean
) As T

Parameters

  • entity
    Type: T

    Type: Entity. The entity instance.

  • includeRelatedEntities
    Type: System.Boolean

    Type: Boolean. Specifies whether to include related entity instances.

Return Value

Type: T

Type: T where T is Entity
.The resulting entity.

Type Parameters

See Also

OrganizationServiceContextExtensions Class
Microsoft.Xrm.Client Namespace
Developer extensions for Microsoft Dynamics CRM 2015
Attach entities to the context (Dynamics CRM 2015)

Return to top

© 2017 Microsoft. All rights reserved. Copyright