Commerce Foundation Catalog CommerceQuery
The purpose of this operation is to retrieve Catalog objects and their related items. This operation can be used to retrieve a specific catalog or a list of catalogs using the SearchCriteria where clause.
Syntax
var queryCatalog = new CommerceQuery<CommerceEntity>("Catalog");
Parameters
Parameter |
Description |
---|---|
Id |
Specifies the catalog to be retrieved using the catalog ID. A Null or empty ID indicates that all Catalogs should be retrieved. |
Operation Sequence Components
Operation Sequence Component |
Description |
---|---|
CatalogLoader |
Executes the search for catalog(s) and caches the result(s). |
CatalogDependantCatalogsProcessor |
Retrieves the dependant catalogs from Commerce Server. |
CatalogRootCategoryProcessor |
Retrieves the root category from Commerce Server and loads the root categories and products for the catalog(s). |
CatalogSearchableCategoriesProcessor |
Retrieves the searchable categories from Commerce Server. |
CatalogSourceCatalogsProcessor |
Retrieves the source catalogs from Commerce Server. |
Related Operations
Related Operation |
Description |
---|---|
CommerceQueryRelatedItem<CommerceEntity> ("DependentCatalogs", "Category") |
Used to retrieve dependant catalog information for this catalog. |
CommerceQueryRelatedItem<CommerceEntity> ("RootCategory", "Category") |
Used to retrieve the root category for the catalog. |
CommerceQueryRelatedItem<CommerceEntity> ("SearchableCategories", "Category") |
Used to retrieve a list of searchable categories for the catalog. |
CommerceQueryRelatedItem<CommerceEntity> ("SourceCatalogs", "Category") |
Used to retrieve a list of source catalogs for the catalog. |
Related Query Operations
Property |
Description |
---|---|
CommerceQueryRelatedItem<CommerceEntity> ("DependentCatalogs", "Category") |
Must be a ModelSearch. |
CommerceQueryRelatedItem<CommerceEntity> ("RootCategory", "Category")) |
Must be a ModelSearch. |
CommerceQueryRelatedItem<CommerceEntity> ("SearchableCategories", "Category") |
Must be a ModelSearch. |
CommerceQueryRelatedItem<CommerceEntity> ("SourceCatalogs", "Category") |
Must be a ModelSearch. |
CommerceQueryRelatedItem<CommerceEntity> ("DependentCatalogs", "Category") |
Must be a ModelSearch. |
Return Value
The Response.Items contains the list of the Catalog entities that match the provided search criteria.
If no catalogs are found, Microsoft Multi-Channel Commerce Foundation will not throw an exception, but rather return a count of 0 in the response.
Exceptions
The following exception can be thrown by Microsoft Multi-Channel Commerce Foundation during this operation:
- FaultException<GeneralOperationFault> - Indicates an operation has resulted in an internal exception being thrown. Details are logged in the event viewer.
Remarks
The Microsoft Multi-Channel Commerce Foundation RequestContext object will contain the user locale information used to get the catalogs in the appropriate language. If the language in the RequestContext is not currently supported, the default language for the catalog(s) will be used.