Table of Contents

Class UnitService

Namespace
Dynamicweb.Ecommerce.Units
Assembly
Dynamicweb.Ecommerce.dll

The service to handle CRUD plus cache A unit could be a BOX, BACK, PALLET etc.

public class UnitService : ICacheStorage<string, Unit>, ICacheStorage<string>, ICacheStorage
Inheritance
UnitService
Implements
Inherited Members

Properties

Info

Information about the object cache

public CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

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

public void ClearCache()

ClearCache(IEnumerable<string>)

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

public 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 void ClearCache(string key)

Parameters

key string

Key to reset

Delete(string)

public virtual void Delete(string id)

Parameters

id string

GetUnit(string)

public virtual Unit GetUnit(string id)

Parameters

id string

Returns

Unit

GetUnits()

public virtual IEnumerable<Unit> GetUnits()

Returns

IEnumerable<Unit>

Save(Unit)

public virtual void Save(Unit unit)

Parameters

unit Unit

SetCacheType<TObjectCache>()

Changes the storage container

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

Type Parameters

TObjectCache
To top