Compartir a través de


CrmEntity.SetRelatedEntities<TEntity> Method (String, String, Nullable<EntityRole>, IEnumerable<TEntity>)

 

Applies To: Dynamics CRM 2013

Sets the collection of related entity instances for the specified relationship.

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

Syntax

protected virtual void SetRelatedEntities<TEntity>(
    string propertyName,
    string relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity> entities
)
where TEntity : Entity
protected:
generic<typename TEntity>
where TEntity : Entity
virtual void SetRelatedEntities(
    String^ propertyName,
    String^ relationshipSchemaName,
    Nullable<EntityRole> primaryEntityRole,
    IEnumerable<TEntity>^ entities
)
abstract SetRelatedEntities<'TEntity when 'TEntity : Entity> : 
        propertyName:string *
        relationshipSchemaName:string *
        primaryEntityRole:Nullable<EntityRole> *
        entities:IEnumerable<'TEntity> -> unit
override SetRelatedEntities<'TEntity when 'TEntity : Entity> : 
        propertyName:string *
        relationshipSchemaName:string *
        primaryEntityRole:Nullable<EntityRole> *
        entities:IEnumerable<'TEntity> -> unit
Protected Overridable Sub SetRelatedEntities(Of TEntity As Entity) (
    propertyName As String,
    relationshipSchemaName As String,
    primaryEntityRole As Nullable(Of EntityRole),
    entities As IEnumerable(Of TEntity)
)

Parameters

  • relationshipSchemaName
    Type: System.String

    Type: String. The schema name of the relationship.

Type Parameters

  • TEntity
    Type: Entity. The entity to which the entities are to be related.

Remarks

Extends the core SetRelatedEntities<TEntity> method.

See Also

SetRelatedEntities Overload
CrmEntity Class
Microsoft.Xrm.Client Namespace

Return to top