Interface IOrderRepository
The order repository, which handles the persistence of orders.
Namespace: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
public interface IOrderRepository
  Methods
Create<TOrderGroup>(Guid, String)
Creates an order
Declaration
TOrderGroup Create<TOrderGroup>(Guid customerId, string name)
    where TOrderGroup : class, IOrderGroup
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Guid | customerId | The customer guid  | 
      
| System.String | name | The name of the order  | 
      
Returns
| Type | Description | 
|---|---|
| TOrderGroup | The created order  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TOrderGroup | 
Delete(OrderReference)
Deletes an order.
Declaration
void Delete(OrderReference orderLink)
  Parameters
| Type | Name | Description | 
|---|---|---|
| OrderReference | orderLink | The order link.  | 
      
Load(OrderReference)
Loads an order.
Declaration
IOrderGroup Load(OrderReference orderLink)
  Parameters
| Type | Name | Description | 
|---|---|---|
| OrderReference | orderLink | The order link.  | 
      
Returns
| Type | Description | 
|---|---|
| IOrderGroup | 
Load(Guid, String)
Loads all orders for a customer.
Declaration
IEnumerable<IOrderGroup> Load(Guid customerId, string name)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Guid | customerId | The customer guid  | 
      
| System.String | name | The name of the order. The name is not unique for each order, instead it's suppose to differentiate orders of the same type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<IOrderGroup> | The orders  | 
      
Load<TOrderGroup>(Guid, String)
Loads all orders of a specific type for a customer.
Declaration
IEnumerable<TOrderGroup> Load<TOrderGroup>(Guid customerId, string name)
    where TOrderGroup : class, IOrderGroup
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Guid | customerId | The customer guid  | 
      
| System.String | name | The name of the order. The name is not unique for each order, instead it's suppose to differentiate orders of the same type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<TOrderGroup> | The orders  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TOrderGroup | 
Load<TOrderGroup>(Int32)
Loads an order.
Declaration
TOrderGroup Load<TOrderGroup>(int orderGroupId)
    where TOrderGroup : class, IOrderGroup
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | orderGroupId | The order group id  | 
      
Returns
| Type | Description | 
|---|---|
| TOrderGroup | The order  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TOrderGroup | 
Save(IOrderGroup)
Saves the order.
Declaration
OrderReference Save(IOrderGroup order)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IOrderGroup | order | The order  | 
      
Returns
| Type | Description | 
|---|---|
| OrderReference | 
SaveAsPaymentPlan(IOrderGroup)
Saves a cart as a PaymentPlan.
Declaration
OrderReference SaveAsPaymentPlan(IOrderGroup cart)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IOrderGroup | cart | The cart  | 
      
Returns
| Type | Description | 
|---|---|
| OrderReference | The order link of the PaymentPlan.  | 
      
SaveAsPurchaseOrder(IOrderGroup)
Saves a cart as a PurchaseOrder.
Declaration
OrderReference SaveAsPurchaseOrder(IOrderGroup cart)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IOrderGroup | cart | The cart  | 
      
Returns
| Type | Description | 
|---|---|
| OrderReference | The order link of the PurchaseOrder.  |