OrderService
The Order service manages items that need to be shipped and fulfilled from a warehouse.
The OrderService is exposed through the
MerchelloContext
var orderService = MerchelloContext.Current.Services.OrderService;
Class
public class OrderService : PageCachedServiceBase<IOrder>,
IOrderService, IPageCachedService<IOrder>, IService
Constructors
Name | Description |
---|---|
OrderService() | Initializes a new instance of the OrderService class. |
OrderService(ILogger) | Initializes a new instance of the OrderService class. |
OrderService(RepositoryFactory, ILogger, IStoreSettingService, IShipmentService) | Initializes a new instance of the OrderService class. |
OrderService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IStoreSettingService, IShipmentService) | Initializes a new instance of the OrderService class. |
OrderService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IStoreSettingService, IShipmentService) | Initializes a new instance of the OrderService class. |
Public Methods
Name | Description |
---|---|
CreateOrder(Guid, Guid, Boolean) | Creates a IOrder without saving it to the database |
CreateOrder(Guid, Guid, Int32, Boolean) | Creates a IOrder without saving it to the database |
CreateOrderWithKey | Creates a IOrder and saves it to the database |
Delete(IOrder, Boolean) | Deletes a single IOrder |
Delete(IEnumerable(IOrder), Boolean) | Deletes a collection IOrder |
GetAllOrderStatuses | Returns a collection of all IOrderStatus |
GetByKey | Gets a IOrder given it's unique 'key' (GUID) |
GetByKeys | Gets list of IOrder objects given a list of Keys |
GetByOrderNumber | Gets a IOrder given it's unique 'OrderNumber' |
GetOrdersByInvoiceKey | Gets a collection of IOrder for a given IInvoice key |
GetOrderStatusByKey | Gets an IOrderStatus by it's key |
GetPage(Int64, Int64, String, SortDirection) | Gets a Page of IOrder |
Save(IOrder, Boolean) | Saves a single IOrder |
Save(IEnumerable(IOrder), Boolean) | Saves a collection of IOrder |
Events
Name | Description |
---|---|
Creating | Occurs before create |
Created | Occurs after create |
Deleting | Occurs before delete |
Deleted | Occurs after delete |
Saving | Occurs before save |
Saved | Occurs after save |
StatusChanging | Occurs before order status change |
StatusChanged | Occurs after order status change |
Interface on GitHub
Updated less than a minute ago