共用方式為


EntityExtensions.SetRelatedEntity<TEntity> Method (Entity, Relationship, TEntity)

 

Applies To: Dynamics CRM 2013

Modifies a related entity for a specific relationship.

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

Syntax

public static void SetRelatedEntity<TEntity>(
    this Entity entity,
    Relationship relationship,
    TEntity value
)
where TEntity : Entity
public:
generic<typename TEntity>
where TEntity : Entity
[ExtensionAttribute]
static void SetRelatedEntity(
    Entity^ entity,
    Relationship^ relationship,
    TEntity value
)
static member SetRelatedEntity<'TEntity when 'TEntity : Entity> : 
        entity:Entity *
        relationship:Relationship *
        value:'TEntity -> unit
<ExtensionAttribute>
Public Shared Sub SetRelatedEntity(Of TEntity As Entity) (
    entity As Entity,
    relationship As Relationship,
    value As TEntity
)

Parameters

  • value
    Type: TEntity

    Type: TEntity, where TEntity is an Entity. The entity instance to be related.

Type Parameters

  • TEntity
    The type, where TEntity is an Entity.

Remarks

Extends the core SetRelatedEntity<TEntity> method.

See Also

SetRelatedEntity Overload
EntityExtensions Class
Microsoft.Xrm.Client Namespace

Return to top