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
- entityType
Type: Microsoft.CommerceServer.Catalog..::.ExtensibleEntityType
Entity definition to add the property.
- propertyName
Type: System..::.String
Property to add.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.