Table of Contents

Class ProductAssignmentRuleMappingService

Namespace
Dynamicweb.Ecommerce.Products.ProductAssignment
Assembly
Dynamicweb.Ecommerce.dll

Provides access to the mappings between product assignment rules and the groups and products they assign.

public class ProductAssignmentRuleMappingService : ICacheStorage<string, ProductAssignmentRuleMappingItem>, ICacheStorage<string>, ICacheStorage
Inheritance
ProductAssignmentRuleMappingService
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(string)

Deletes the mapping with the given id.

public virtual void Delete(string mappingId)

Parameters

mappingId string

The mapping id.

DeleteAll(string)

Deletes all mappings belonging to the given rule.

public virtual void DeleteAll(string ruleId)

Parameters

ruleId string

The rule id. Matched case-insensitively.

GetAllByRuleId(string)

Gets all mappings belonging to the given rule.

public virtual IEnumerable<ProductAssignmentRuleMappingItem> GetAllByRuleId(string ruleId)

Parameters

ruleId string

The rule id. Matched case-insensitively.

Returns

IEnumerable<ProductAssignmentRuleMappingItem>

GetAllMappings()

Gets all rule mappings.

public virtual IEnumerable<ProductAssignmentRuleMappingItem> GetAllMappings()

Returns

IEnumerable<ProductAssignmentRuleMappingItem>

GetById(string)

Gets a rule mapping by its id.

public virtual ProductAssignmentRuleMappingItem? GetById(string mappingId)

Parameters

mappingId string

The mapping id.

Returns

ProductAssignmentRuleMappingItem

The matching ProductAssignmentRuleMappingItem, or null if nothing was found.

Save(ProductAssignmentRuleMappingItem)

Saves a rule mapping to the database.

public virtual void Save(ProductAssignmentRuleMappingItem item)

Parameters

item ProductAssignmentRuleMappingItem

The mapping to create or update.

Exceptions

ArgumentNullException

Thrown when item is null.

SetCacheType<TObjectCache>()

Changes the storage container

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

Type Parameters

TObjectCache
To top