Share via


DeleteDefinition Method (String)

Deletes an existing product or category definition.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Sub DeleteDefinition ( _
    definitionName As String _
)
'Usage
Dim instance As CatalogContext
Dim definitionName As String

instance.DeleteDefinition(definitionName)
public void DeleteDefinition(
    string definitionName
)
public:
void DeleteDefinition(
    String^ definitionName
)
public function DeleteDefinition(
    definitionName : String
)

Parameters

  • definitionName
    Type: System..::.String
    The definition to delete. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

The definitionName is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Use this method to delete a definition from the Product Catalog System.

This method will not delete the definition if it is being used in one or more catalogs. You should remove the definition from the catalog system first.

Examples

This example describes how to delete a definition.

private void DeleteDefinition(CatalogContext catalogContext, string definitionName)
{
  catalogContext.DeleteDefinition(definitionName);
}

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

DeleteDefinition Overload

Microsoft.CommerceServer.Catalog Namespace