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
System.Object
SerializableCartDB
Implements
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.Internal.DataAccess
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
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.

FindCarts(OrderSearchField, String, IEnumerable<String>, Int32, Int32, Boolean, out Int32)

Finds ICart by search field and search value.

Declaration
public IEnumerable<ICart> FindCarts(OrderSearchField searchField, string searchValue, IEnumerable<string> excludedCartNames, int startIndex, int recordsToRetrieve, bool returnTotalCount, out int totalRecords)
Parameters
Type Name Description
OrderSearchField searchField

The search field use to search. For example: Email, CustomerName.

System.String searchValue

The search value.

System.Collections.Generic.IEnumerable<System.String> excludedCartNames

The cart names that will be excluded when finding carts.

System.Int32 startIndex

The starting index of record to retrieve.

System.Int32 recordsToRetrieve

The number of records to retrieve.

System.Boolean returnTotalCount

The flag to indicate if the search should return the total count of matched carts.

System.Int32 totalRecords

The total records returned.

Returns
Type Description
System.Collections.Generic.IEnumerable<ICart>

A collection of ICart.

InsertBatchCarts(IEnumerable<SerializableCart>)

Insert a list of SerializableCart to the database. Carts will be stored in SerializableCart table.

Declaration
public void InsertBatchCarts(IEnumerable<SerializableCart> carts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<SerializableCart> carts

The list of SerializableCart needs to be inserted.

Remarks

Use to insert serializable carts.

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.

Implements