Class OrderRepositoryExtensions
Extension method for IOrderRepository.
Inheritance
System.Object
OrderRepositoryExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2Syntax
public static class OrderRepositoryExtensions
Methods
Create<TOrderGroup>(IOrderRepository, String)
Creates an order for the current user.
Declaration
public static IOrderGroup Create<TOrderGroup>(this IOrderRepository orderRepository, string name)
where TOrderGroup : class, IOrderGroup
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderRepository | orderRepository | The order repository. |
| System.String | name | Ther order name. |
Returns
| Type | Description |
|---|---|
| IOrderGroup | The orders. |
Type Parameters
| Name | Description |
|---|---|
| TOrderGroup |
Load(IOrderRepository)
Loads all orders for the current user.
Declaration
[Obsolete("This method is no longer used. Will remain at least until January 2020.")]
public static IEnumerable<IOrderGroup> Load(this IOrderRepository orderRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderRepository | orderRepository | The order repository. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IOrderGroup> | The orders. |
Load(IOrderRepository, Guid)
Loads all orders with default name for a customer.
Declaration
[Obsolete("This method is no longer used. Will remain at least until January 2020.")]
public static IEnumerable<IOrderGroup> Load(this IOrderRepository orderRepository, Guid customerId)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderRepository | orderRepository | The order repository. |
| System.Guid | customerId | The customer guid. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IOrderGroup> | The orders. |
Load<TOrderGroup>(IOrderRepository)
Loads all orders for the current user.
Declaration
public static IEnumerable<TOrderGroup> Load<TOrderGroup>(this IOrderRepository orderRepository)
where TOrderGroup : class, IOrderGroup
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderRepository | orderRepository | The order repository. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<TOrderGroup> | The orders. |
Type Parameters
| Name | Description |
|---|---|
| TOrderGroup |
Load<TOrderGroup>(IOrderRepository, Guid)
Loads all orders with default name of a specific type for a customer.
Declaration
public static IEnumerable<TOrderGroup> Load<TOrderGroup>(this IOrderRepository orderRepository, Guid customerId)
where TOrderGroup : class, IOrderGroup
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderRepository | orderRepository | The order repository. |
| System.Guid | customerId | The customer guid. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<TOrderGroup> | The orders. |
Type Parameters
| Name | Description |
|---|---|
| TOrderGroup |