Share via


OrganizationServiceContextExtensions.DetachLink<TSource, TTarget> Method (OrganizationServiceContext, TSource, Expression<Func<TSource, TTarget>>, TTarget)

 

Applies To: Dynamics CRM 2013

Detaches a two entity instances.

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

Syntax

public static bool DetachLink<TSource, TTarget>(
    this OrganizationServiceContext context,
    TSource source,
    Expression<Func<TSource, TTarget>> propertySelector,
    TTarget target
)
where TSource : Entity
where TTarget : Entity
public:
generic<typename TSource, typename TTarget>
where TSource : Entity
where TTarget : Entity
[ExtensionAttribute]
static bool DetachLink(
    OrganizationServiceContext^ context,
    TSource source,
    Expression<Func<TSource, TTarget>^>^ propertySelector,
    TTarget target
)
static member DetachLink<'TSource, 'TTarget when 'TSource : Entity when 'TTarget : Entity> : 
        context:OrganizationServiceContext *
        source:'TSource *
        propertySelector:Expression<Func<'TSource, 'TTarget>> *
        target:'TTarget -> bool
<ExtensionAttribute>
Public Shared Function DetachLink(Of TSource As Entity, TTarget As Entity) (
    context As OrganizationServiceContext,
    source As TSource,
    propertySelector As Expression(Of Func(Of TSource, TTarget)),
    target As TTarget
) As Boolean

Parameters

  • source
    Type: TSource

    Type: TSource. The source entity instance.

  • target
    Type: TTarget

    Type: TTarget. The target entity instance.

Return Value

Type: System.Boolean

Type: Boolean
.

Type Parameters

  • TSource
    The source entity.
  • TTarget
    The target entity.

Remarks

This is an extension to the core DetachLink method.

See Also

DetachLink Overload
OrganizationServiceContextExtensions Class
Microsoft.Xrm.Client Namespace

Return to top