Table of Contents

Class OrderContextService

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll

Provides access to the order contexts configured in the solution.

public class OrderContextService : ICacheStorage<string, OrderContext>, ICacheStorage<string>, ICacheStorage
Inheritance
OrderContextService
Implements
Inherited Members

Properties

Info

Information about the object cache

public virtual CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache

public virtual void ClearCache()

ClearCache(IEnumerable<string>)

Resets the specified keys to the default value for objects stored in the object cache

public virtual void ClearCache(IEnumerable<string> keys)

Parameters

keys IEnumerable<string>

Keys to reset

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache

public virtual void ClearCache(string key)

Parameters

key string

Key to reset

Delete(OrderContext)

Deletes the specified order context if it has an id.

public virtual void Delete(OrderContext orderContext)

Parameters

orderContext OrderContext

The entity to delete.

Exceptions

ArgumentNullException

Thrown when orderContext is null.

GetOrderContextById(string)

Gets an order context by its id.

public virtual OrderContext? GetOrderContextById(string id)

Parameters

id string

The order context id. Matched case-insensitively.

Returns

OrderContext

The matching OrderContext, or null if nothing was found.

GetOrderContexts()

Gets all order contexts.

public virtual IEnumerable<OrderContext> GetOrderContexts()

Returns

IEnumerable<OrderContext>

An IEnumerable<T> sequence of all OrderContext entities.

Save(OrderContext)

Saves an order context to the database.

public virtual void Save(OrderContext orderContext)

Parameters

orderContext OrderContext

The entity to create or update.

Exceptions

ArgumentNullException

Thrown when orderContext is null.

SetCacheType<TObjectCache>()

Changes the storage container

public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, OrderContext>

Type Parameters

TObjectCache
To top