Share via


How to Search for Baskets

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

You can search the orders database to find all baskets that meet certain conditions. You might search the orders database to delete old baskets or to mine the data for trends.

To search for baskets

  1. Create an OrderManagementContext object.

    For more information about how to create an OrderManagementContext object, see How to Create an OrderManagementContext Object.

  2. Get the BasketManager object from the OrderManagementContext object.

  3. Create a SearchClause object.

    For more information about how to create a SearchClause object, see How to Create a Search Clause.

  4. Optionally, to specify how to return results, create a SearchOptions object.

    For more information about how to create a SearchOptions object, see How to Specify Search Options.

  5. Call the SearchBaskets method on the BasketManager object and pass the SearchClause object and, optionally, a SearchOptions object as parameters.

  6. Enumerate the results of the search.

    For more information about how to enumerate the results of a search, see How to Enumerate Search Results.

    For a complete example that illustrates how to search for baskets, see Sample Basket Search Implementation.

See Also

Other Resources

Sample Basket Search Implementation

Searching the Orders Database