Partilhar via


RemovePropertyFromEntity Method

Removes a property from one of the built-in entity definitions (Inventory Catalogs, Inventory SKUs, Catalogs, or Properties).

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

Syntax

'Declaration
Public Sub RemovePropertyFromEntity ( _
    entityType As ExtensibleEntityType, _
    propertyName As String _
)
'Usage
Dim instance As CatalogContext
Dim entityType As ExtensibleEntityType
Dim propertyName As String

instance.RemovePropertyFromEntity(entityType, _
    propertyName)
public void RemovePropertyFromEntity(
    ExtensibleEntityType entityType,
    string propertyName
)
public:
void RemovePropertyFromEntity(
    ExtensibleEntityType entityType, 
    String^ propertyName
)
public function RemovePropertyFromEntity(
    entityType : ExtensibleEntityType, 
    propertyName : String
)

Parameters

Remarks

Removes the extended property.

Examples

CatalogEntitiesExtension catalogEntitiesExtension = new CatalogEntitiesExtension(catalogContext);
catalogEntitiesExtension.AddPropertyToCatalogEntity(property1.Name);
CatalogPropertiesDataSet extensiblePropertiesDataSet = catalogEntitiesExtension.GetEntityProperties(ExtensibleEntityType.ProductCatalog);
//.
//.  Do other things here, between the add and remove 
//.
//Remove the extended property
catalogEntitiesExtension.RemovePropertyFromEntity(property1.Name);
//Delete the catalog
catalogContext.DeleteCatalog(catalog.Name);
catalogContext.DeleteCatalog(virtualCatalog.Name);

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

Microsoft.CommerceServer.Catalog Namespace