GetOrderTemplatesForUser Method
Returns the collection of OrderTemplate objects associated with the specified customer.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function GetOrderTemplatesForUser ( _
userId As Guid _
) As OrderGroupCollection
'Usage
Dim instance As OrderContext
Dim userId As Guid
Dim returnValue As OrderGroupCollection
returnValue = instance.GetOrderTemplatesForUser(userId)
public OrderGroupCollection GetOrderTemplatesForUser(
Guid userId
)
public:
OrderGroupCollection^ GetOrderTemplatesForUser(
Guid userId
)
public function GetOrderTemplatesForUser(
userId : Guid
) : OrderGroupCollection
Parameters
- userId
Type: System..::.Guid
The identifier of the customer owning the order templates.
Return Value
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroupCollection
A collection of OrderTemplate 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 (Guid.Empty). |
Remarks
Returns a collection of OrderTemplate objects associated with the specified customer, if any are found; otherwise, nullNothingnullptra null reference (Nothing in Visual Basic).
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.