Saves the basket to the order capture system database as a placed purchase order.
Namespace:
Microsoft.CommerceServer.Runtime.Orders
Assembly:
Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Visual Basic (Declaration)
Public Function SaveAsOrder As PurchaseOrder
Dim instance As Basket
Dim returnValue As PurchaseOrder
returnValue = instance.SaveAsOrder()
public PurchaseOrder SaveAsOrder()
public:
PurchaseOrder^ SaveAsOrder()
public function SaveAsOrder() : PurchaseOrder
Use this method to persist the basket as a purchase order to the underlying stores.
SaveAsOrder conducts a two-phase commit using a distributed transaction coordinator.
If SaveAsOrder returns successfully, the underlying Basket is cleared. If Save is called immediately after this, a new Basket is created with the same name as the previous Basket.
When an exception is thrown from SaveAsOrder, the in-memory version of the basket is restored to the condition before SaveAsOrder was called. It is possible that any unsaved in-memory changes may be saved to storage as part of error handling.
Reference