EntityReference.GetEntity Method (Boolean)

Gets the external content type by using a Boolean parameter to check the existence of the external content type and throws an exception if the external content type is not found.

Namespace:  Microsoft.SharePoint.BusinessData.Administration.Client
Assembly:  Microsoft.SharePoint.BusinessData.Administration.Client (in Microsoft.SharePoint.BusinessData.Administration.Client.dll)

Syntax

'Declaration
Public Function GetEntity ( _
    throwIfNotFound As Boolean _
) As Entity
'Usage
Dim instance As EntityReference
Dim throwIfNotFound As Boolean
Dim returnValue As Entity

returnValue = instance.GetEntity(throwIfNotFound)
public Entity GetEntity(
    bool throwIfNotFound
)

Parameters

  • throwIfNotFound
    Type: System.Boolean

    true to throw a MetadataObjectNotFoundException if the referenced the external content type cannot be found; to return a a null reference (Nothing in Visual Basic) reference if the external content type cannot be found.

Return Value

Type: Microsoft.SharePoint.BusinessData.Administration.Client.Entity

The external content type.

Exceptions

Exception Condition
ArgumentException

If the name or namespace contains more than 255 characters.

Remarks

The throwIfNotFound parameter only affects what happens when the external content type is not found. It does not affect any other exceptions that might be thrown.

See Also

Reference

EntityReference Class

EntityReference Members

GetEntity Overload

Microsoft.SharePoint.BusinessData.Administration.Client Namespace