/// <summary>
        /// Gets the <see cref="ICountry"/> for the <see cref="IAddress"/>
        /// </summary>
        /// <param name="address">
        /// The address.
        /// </param>
        /// <returns>
        /// The <see cref="ICountry"/>.
        /// </returns>
        public static ICountry Country(this IAddress address)
        {
            if (string.IsNullOrEmpty(address.CountryCode))
            {
                return(null);
            }

            return(new Country(address.CountryCode, StoreSettingService.GetProvincesByCountryCode(address.CountryCode))
            {
                ProvinceLabel = StoreSettingService.GetProvinceLabelForCountry(address.CountryCode)
            });
        }
Example #2
0
 public virtual IEnumerable <IProvince> PostGetRegionsForCountry(string countryCode)
 {
     return(StoreSettingService.GetProvincesByCountryCode(countryCode));
 }