Interface IWarehouseRepository
Accessors for warehouse data
Namespace: Mediachase.Commerce.Inventory
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public interface IWarehouseRepository
Remarks
This interface does not support operations on multiple warehouses fully as these are unlikely in a real environment.
Methods
Delete(Int32)
Deletes a specific warehouse record.
Declaration
void Delete(int warehouseId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | warehouseId | The catalog entry to delete warehouse for. |
Get(Int32)
Gets a specific warehouse.
Declaration
IWarehouse Get(int warehouseId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | warehouseId | The warehouse ID to return data for. |
Returns
Type | Description |
---|---|
IWarehouse | The requested warehouse record, or null if the Id does not match an existing warehouse. |
Get(String)
Gets a specific warehouse.
Declaration
IWarehouse Get(string warehouseCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | warehouseCode | The warehouse code to return data for. |
Returns
Type | Description |
---|---|
IWarehouse | The requested warehouse record, or null if the Code does not match an existing warehouse. |
GetDefaultWarehouse()
Gets the default warehouse.
Declaration
IWarehouse GetDefaultWarehouse()
Returns
Type | Description |
---|---|
IWarehouse | The default warehouse, or null if no warehouses exist. |
List()
Gets all warehouses.
Declaration
IEnumerable<IWarehouse> List()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IWarehouse> | All warehouse records, or null if there are no warehouses defined. |
Save(IWarehouse)
Saves the provided warehouse record.
Declaration
void Save(IWarehouse warehouse)
Parameters
Type | Name | Description |
---|---|---|
IWarehouse | warehouse | The warehouse to be saved. |
Remarks
If the WarehouseId matches the Id of an existing warehouse, the existing record will be updated.
If the WarehouseId is below zero (0) the warehouse is added with a new Id.
If the WarehouseId neither matches the Id of an existing warehouse nor is below zero (0), an Exception will be raised.