Table of Contents

Class CountryService

Namespace
Dynamicweb.Ecommerce.International
Assembly
Dynamicweb.Ecommerce.dll
public class CountryService : ICacheStorage<CountryKey, Country>, ICacheStorage<CountryKey>, ICacheStorage
Inheritance
CountryService
Implements
Inherited Members

Methods

ClearCache()

Clears cached countries.
public void ClearCache()

ClearCache(CountryKey)

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

Parameters

key CountryKey
Key to reset

ClearCache(IEnumerable<CountryKey>)

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

Parameters

keys IEnumerable<CountryKey>
Keys to reset

Delete(string)

Deletes an instance with the specified parameters.
public void Delete(string countryCode)

Parameters

countryCode string
The two-character country code.

DeleteCountryText(string, string)

[Obsolete("Use DeleteCountryTranslations")]
public void DeleteCountryText(string countryCode, string languageId)

Parameters

countryCode string
languageId string

DeleteCountryTranslations(string, string)

Deletes translation in a given language for a country and its regions.
public void DeleteCountryTranslations(string countryCode, string languageId)

Parameters

countryCode string
The county two-character code.
languageId string
The language id.

DeleteRegion(string, string)

Deletes an instance with the specified parameters.
public void DeleteRegion(string countryCode, string regionCode)

Parameters

countryCode string
The two-character country code.
regionCode string
The region code.

GetCountries()

Gets the countries.
public CountryCollection GetCountries()

Returns

CountryCollection
A collection of the Country.

GetCountry(string)

Gets the country.
public Country GetCountry(string countryCode)

Parameters

countryCode string

Returns

Country
A country Country.

GetRegion(string, string)

Gets the country.
public Country GetRegion(string countryCode, string regionCode)

Parameters

countryCode string
regionCode string
The region code.

Returns

Country
A country Country.

GetRegions(string)

Gets regions by the country code.
public CountryCollection GetRegions(string countryCode)

Parameters

countryCode string
The country code.

Returns

CountryCollection
A collection of the Country.

Save(Country)

Saves an instance with the specified parameters.
public void Save(Country country)

Parameters

country Country
The country

UpdateCountryCode(string, string)

Update country and its relations with a new Code.
public void UpdateCountryCode(string oldCode2, string newCode2)

Parameters

oldCode2 string
The old two-character code.
newCode2 string
The new two-character code.
To top