共用方式為


DeleteRequest 類別

Contains the data that is needed to delete a deployment record.

命名空間: Microsoft.Xrm.Sdk.Deployment
組件: Microsoft.Xrm.Sdk.Deployment (在 Microsoft.Xrm.Sdk.Deployment.dll 中)

語法

'宣告
<GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")> _
<DataContractAttribute(Name:="DeleteRequest", Namespace:="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")> _
<KnownTypeAttribute(GetType(DeleteOrganizationRequest))> _
<DebuggerStepThroughAttribute> _
Public Class DeleteRequest
    Inherits DeploymentServiceRequest
[GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 
[DataContractAttribute(Name="DeleteRequest", Namespace="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")] 
[KnownTypeAttribute(typeof(DeleteOrganizationRequest))] 
[DebuggerStepThroughAttribute] 
public class DeleteRequest : DeploymentServiceRequest

範例

The following code shows how to delete an organization.

using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
{
    EntityInstanceId id = new EntityInstanceId
    {
        Name = "AlpineSkiHouse2"
    };

    // disable the organization
    Organization organization = (Organization)client.Retrieve(DeploymentEntityType.Organization, id);
    organization.State = OrganizationState.Disabled;
    client.Update(organization);


    // delete the organization
    DeleteRequest request = new DeleteRequest
    {
        EntityType = DeploymentEntityType.Organization,
        InstanceTag = id
    };
    DeleteResponse response = (DeleteResponse)client.Execute(request);

    client.Close();
}

備註

Pass an instance of this class to the Execute method, which returns an instance of DeleteResponse.

Note that this is the Deployment Web Service. To delete organization data records in Microsoft Dynamics CRM, use DeleteRequest.

繼承階層

System.Object
   Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
    Microsoft.Xrm.Sdk.Deployment.DeleteRequest
       Microsoft.Xrm.Sdk.Deployment.DeleteOrganizationRequest

執行緒安全

此類型的任何公用靜態 (Visual Basic 中的 Shared) 成員都具備執行緒安全。任何執行個體成員都不保證具備執行緒安全。

平台

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows 98、Windows 2000、Windows 2000 Server、Windows CE、Windows Server 2008、Windows 98 Second Edition、Pocket PC、智慧型手機、Windows Server 2003、Windows XP Professional、Windows Server 2008、Windows Server 2012、Windows 7、Windows 8、Windows 8.1

Change History

請參閱

參照

DeleteRequest 成員
Microsoft.Xrm.Sdk.Deployment 命名空間
DeleteResponse

其他資源

Introduction to the Deployment Web Service

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.