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 virtual CacheInformation Info { get; }
Property Value
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
keysIEnumerable<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
keystringKey to reset
Delete(string)
Deletes the shop.
public virtual void Delete(string shopId)
Parameters
shopIdstringThe shop ID.
GetDefaultLanguageId(string)
Gets the default shop.
public virtual string GetDefaultLanguageId(string shopId)
Parameters
shopIdstringThe shop ID.
Returns
GetDefaultShop()
public virtual Shop? GetDefaultShop()
Returns
GetProductCountByShopsForBackendTree(string)
Gets product count in all shops for current language, without variants.
public virtual Dictionary<string, int> GetProductCountByShopsForBackendTree(string languageId)
Parameters
languageIdstring
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
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
shopIdstringThe shop ID.
Returns
GetShopRelatedLanguages(string)
Gets the shop languages.
public virtual IEnumerable<Language> GetShopRelatedLanguages(string shopId)
Parameters
shopIdstringThe 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
shopIdsIEnumerable<string>
Returns
- IEnumerable<Shop>
The collection of the Shop.
HasGroups(Shop)
Gets the value indicating whether shop has groups.
public virtual bool HasGroups(Shop shop)
Parameters
shopShopThe shop.
Returns
Save(Shop)
Saves the shop.
public virtual Shop Save(Shop shop)
Parameters
shopShopThe shop.
Returns
- Shop
The shop after saving.
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, Shop>
Type Parameters
TObjectCache