Partager via


GetBasketsForUser Method

Returns the collection of Basket objects associated with the specified customer.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Function GetBasketsForUser ( _
    userId As Guid _
) As OrderGroupCollection
'Usage
Dim instance As OrderContext
Dim userId As Guid
Dim returnValue As OrderGroupCollection

returnValue = instance.GetBasketsForUser(userId)
public OrderGroupCollection GetBasketsForUser(
    Guid userId
)
public:
OrderGroupCollection^ GetBasketsForUser(
    Guid userId
)
public function GetBasketsForUser(
    userId : Guid
) : OrderGroupCollection

Parameters

  • userId
    Type: System..::.Guid
    The identifier of the customer owning the baskets.

Return Value

Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroupCollection
A collection of Basket objects associated with the specified customer, if any are found; otherwise, nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentException

userId is empty.

Remarks

Returns a collection of Basket objects associated with the specified customer, if any are found; otherwise, nullNothingnullptra null reference (Nothing in Visual Basic).

Permissions

See Also

Reference

OrderContext Class

OrderContext Members

Microsoft.CommerceServer.Runtime.Orders Namespace