Table of Contents

Class FavoriteListService

Namespace
Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites
Assembly
Dynamicweb.Ecommerce.dll
public class FavoriteListService : ICacheStorage<int, List<FavoriteList>>, ICacheStorage<int>, ICacheStorage
Inheritance
FavoriteListService
Implements
Inherited Members

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache
public void ClearCache()

ClearCache(IEnumerable<int>)

Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>
Keys to reset

ClearCache(int)

Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(int key)

Parameters

key int
Key to reset

CreateFavoriteList(int, string)

Create a New favorite list with the provided name, And assign it to the current user.
public FavoriteList CreateFavoriteList(int userId, string name)

Parameters

userId int
The id of user
name string
The name for a new favorite list

Returns

FavoriteList

CreateFavoriteList(int, string, bool)

Create a New favorite list with the provided name, And assign it to the current user.
public FavoriteList CreateFavoriteList(int userId, string name, bool isDefault)

Parameters

userId int
The id of user
name string
The name for a new favorite list
isDefault bool
Is default favorite list created or not

Returns

FavoriteList

Delete(FavoriteList)

Deletes the customer product list
public void Delete(FavoriteList list)

Parameters

list FavoriteList
The customer product list.

GetListById(int, int)

Gets the favorite list by user id.
public FavoriteList GetListById(int userId, int favoriteListId)

Parameters

userId int
The user id of favorite list.
favoriteListId int
The identifier of a favorite list

Returns

FavoriteList
The favorites list

GetLists(int)

Gets the favorites list by user id.
public IEnumerable<FavoriteList> GetLists(int userId)

Parameters

userId int
The id of user

Returns

IEnumerable<FavoriteList>
The favorites list

RemoveFavoriteList(int, int)

Delete the favorite list if it belongs to the current user and all the favorite list products. If the favorite list doesn't belong to the user, we shouldn't do anything.
public void RemoveFavoriteList(int userId, int favoriteListId)

Parameters

userId int
The id of user
favoriteListId int
The identifier of a favorite list

RenameFavoriteList(int, int, string)

Rename the favorite list if it belongs to the current user, If the favorite list doesn't belong to the user, we shouldn't do anything.
public void RenameFavoriteList(int userId, int favoriteListId, string name)

Parameters

userId int
The id of user
favoriteListId int
The identifier of a favorite list
name string
The new name for a favorite list

Save(FavoriteList)

Saves the favorite product list.
public void Save(FavoriteList list)

Parameters

list FavoriteList
The favorite product list.
To top