Table of Contents

Class ShopService

Namespace
Dynamicweb.Ecommerce.Shops
Assembly
Dynamicweb.Ecommerce.dll

The ShopService class providing methods for querying and saving The Shop Aggregate to and from persistence.

public class ShopService : ICacheStorage<string, Shop>, ICacheStorage<string>, ICacheStorage
Inheritance
ShopService
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)

Deletes the shop.

public virtual void Delete(string shopId)

Parameters

shopId string

The shop ID.

GetDefaultLanguageId(string)

Gets the default shop.

public virtual string GetDefaultLanguageId(string shopId)

Parameters

shopId string

The shop ID.

Returns

string

The instance of the Shop, or null if the shop was not found.

GetDefaultShop()

public virtual Shop GetDefaultShop()

Returns

Shop

GetProductCountByShopsForBackendTree(string)

Gets product count in all shops for current language, without variants.

public virtual Dictionary<string, int> GetProductCountByShopsForBackendTree(string languageId)

Parameters

languageId string

Returns

Dictionary<string, int>

The count of products in all shops for current language, without variants.

GetProductCountForBackendTree(string, string)

Gets product count in shop for current language, without variants.

public virtual int GetProductCountForBackendTree(string shopId, string languageId)

Parameters

shopId string

The shop ID.

languageId string

Returns

int

The count of products in shop for current language, without variants.

GetShop(string)

Gets the shop.

public virtual Shop GetShop(string shopId)

Parameters

shopId string

The shop ID.

Returns

Shop

The instance of the Shop, or null if the shop was not found.

GetShopRelatedLanguages(string)

Gets the shop languages.

public virtual IEnumerable<Language> GetShopRelatedLanguages(string shopId)

Parameters

shopId string

The shop ID.

Returns

IEnumerable<Language>

The languages for the shop.

GetShops()

Gets all shops in solution.

public virtual IEnumerable<Shop> GetShops()

Returns

IEnumerable<Shop>

The collection of the Shop.

GetShops(IEnumerable<string>)

Gets all shops in solution matching the provided IDs.

public virtual IEnumerable<Shop> GetShops(IEnumerable<string> shopIds)

Parameters

shopIds IEnumerable<string>

Returns

IEnumerable<Shop>

The collection of the Shop.

HasGroups(Shop)

Gets the value indicating whether shop has groups.

public bool HasGroups(Shop shop)

Parameters

shop Shop

The shop.

Returns

bool

Save(Shop)

Saves the shop.

public virtual Shop Save(Shop shop)

Parameters

shop Shop

The shop.

Returns

Shop

The shop after saving.

SetCacheType<TObjectCache>()

Changes the storage container

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

Type Parameters

TObjectCache
To top