Class CountryService
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
public class CountryService : ICacheStorage<CountryKey, Country>, ICacheStorage<CountryKey>, ICacheStorage
- Inheritance
-
Country
Service
- Implements
- Inherited Members
Properties
Info
Information about the object cache
Property Value
Methods
ClearCache()
Clears cached countries.
ClearCache(CountryKey)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
CountryKey Key to reset
ClearCache(IEnumerable<CountryKey>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<CountryKey >Keys to reset
Delete(string)
Deletes an instance with the specified parameters.
Parameters
countryCode
stringThe two-character country code.
DeleteCountryTranslations(string, string)
Deletes translation in a given language for a country and its regions.
Parameters
DeleteRegion(string, string)
Deletes an instance with the specified parameters.
Parameters
GetCountries()
Gets the countries.
Returns
- Country
Collection A collection of the Country.
GetCountry(string)
Gets the country.
Parameters
countryCode
string
Returns
GetRegion(string, string)
Gets the country.
Parameters
Returns
GetRegions(Country)
Gets regions by the country.
Parameters
country
CountryThe country.
Returns
- Country
Collection A collection of the Country.
GetRegions(string)
Gets regions by the country code.
Parameters
countryCode
stringThe country code.
Returns
- Country
Collection A collection of the Country.
Save(Country)
Saves an instance with the specified parameters.
Parameters
country
CountryThe country
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<CountryKey, Country>
Type Parameters
TObjectCache
UpdateCountryCode(string, string)
Update country and its relations with a new Code.