Class SerializableCartDB
This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Represents database access class to manipulate SerializableCart.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Commerce.Order.Internal.DataAccess
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2Syntax
public class SerializableCartDB : ICartSearchService
Constructors
SerializableCartDB(IConnectionStringHandler)
Initializes a new instance of the SerializableCartDB class.
Declaration
public SerializableCartDB(IConnectionStringHandler connectionHandler)
Parameters
Type | Name | Description |
---|---|---|
IConnectionStringHandler | connectionHandler | The connection string handler. |
Methods
Delete(ICart)
Deletes a SerializableCart.
Declaration
public void Delete(ICart cart)
Parameters
Type | Name | Description |
---|---|---|
ICart | cart | The cart to delete. |
FindCarts(CartFilter)
Finds SerializableCarts by a given CartFilter.
Declaration
public virtual IEnumerable<SerializableCart> FindCarts(CartFilter cartFilter)
Parameters
Type | Name | Description |
---|---|---|
CartFilter | cartFilter | The filter options when finding cart. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SerializableCart> | The collection of SerializableCart. |
FindCarts(CartFilter, out Int32)
Finds SerializableCarts by a given CartFilter.
Declaration
public virtual IEnumerable<SerializableCart> FindCarts(CartFilter cartFilter, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
CartFilter | cartFilter | The filter options when finding cart. |
System.Int32 | totalRecords | The total records. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SerializableCart> | The collection of SerializableCart. |
FindCarts(OrderSearchFilter, out Int32)
Finds ICart by a set of parameters.
Declaration
public IEnumerable<ICart> FindCarts(OrderSearchFilter filter, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
OrderSearchFilter | filter | The filter options when finding cart. |
System.Int32 | totalRecords | The total records returned. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ICart> | A collection of ICart. |
Load(CartFilter)
Loads SerializableCarts by a given CartFilter.
Declaration
public IEnumerable<SerializableCart> Load(CartFilter cartFilter)
Parameters
Type | Name | Description |
---|---|---|
CartFilter | cartFilter | The filter options when loading serializable cart. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SerializableCart> | The collection of SerializableCart. |
Save(SerializableCart)
Saves a SerializableCart to the database. The cart will be stored in SerializableCart table.
Declaration
public int Save(SerializableCart cart)
Parameters
Type | Name | Description |
---|---|---|
SerializableCart | cart | The SerializableCart needs to be saved. |
Returns
Type | Description |
---|---|
System.Int32 | The cart identifier. |
SaveBatchCarts(IEnumerable<SerializableCart>)
Saves a list of SerializableCart to the database. Carts will be stored in SerializableCart table.
Declaration
public void SaveBatchCarts(IEnumerable<SerializableCart> carts)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<SerializableCart> | carts | The list of SerializableCart needs to be saved. |
Remarks
Used to migrate existing serializable cart.